pulp-platform / pulpino

An open-source microcontroller system based on RISC-V
http://www.pulp-platform.org
Other
901 stars 298 forks source link

Question about Arduino part for PULPino #61

Open LinTaiwan opened 7 years ago

LinTaiwan commented 7 years ago

Hi I want to use arduino SPI part of PULPino, not sure if it is necessary to write SS pin low for PULPino before SPI.transfer( ), If I want to write this kind of arduino code, digitalWrite(SS, x) , is necessary for your arduino part ? image because not see in your sw/app example SPI_test.cpp. But in normal arduino board, it need this command digitalWrite(SS, 0) to select salve part before SPI.tansfer() image But I saw in your sw/libs/Arduino_lib/core_libs/inc/pins_arduino.h, there have pin definition for SPI's SS. Is it this SS will automatically turn low when SPI.transfer( ) begin? ( I use Zedboard FPGA) or Should I have setting like const byte SS= 16; pinMode(16, Output) in arduino code at begining, and change one bit of pulpinomu_top.v 's gpio_out[16] for SS in vivado?
Any suggestion for this SS pin setting for Zedboard image

BTW, I make PULPino SPI master 4 pins (MISO MOSI SS SCLK) to output in FPGA so I can connect slave part at ZedBoard by SPI. And I guess spi_master_csn0_o pin is connect to arduino pin SS, right? image image

Thank you Frank

mrninhvn commented 4 years ago

Hi, Have you found that yet?