Forum Discussion
Hi @giomate,
Thank you for posting in Intel community forum and hope this message find you well.
If i understand the situation correctly, I would recommenad that the following design example might be helpful to your needs.
Please do refer to the 'SPI_Bridge_Design_Example.zip', within the nios2 project there is a references C code to write and read to onchip memory connected via SPI for further details.
Warm regards.
BB
- BoonBengT_Altera5 years ago
Moderator
Hi @giomate,
Good day, just checking in by any chances did you managed to look into the recommendation above.
Please do let us know if you have any difficulties doing so.
Thank you.
Warm regards
BB
- giomate5 years ago
New Contributor
hi BoonBeng,
thanks for your support,
at the moment , i got the spi working , when i modified the general SPI transfer function on that way:
void SPI_Handler::Open(void){
IOWR_ALTERA_AVALON_SPI_CONTROL(base_address, ALTERA_AVALON_SPI_CONTROL_SSO_MSK);
}
void SPI_Handler::Close(void){
IOWR_ALTERA_AVALON_SPI_CONTROL(base_address, 0);
}
void SPI_Handler::SEN(bool sen){
if(sen){
IOWR_ALTERA_AVALON_SPI_CONTROL(base_address, 0);
}else{
IOWR_ALTERA_AVALON_SPI_CONTROL(base_address, ALTERA_AVALON_SPI_CONTROL_SSO_MSK);
}
}
however, on higher baudrates(SPI_ADF5610_TARGETCLOCK >4000000u), something is not working...
So , if the system is 80 MHz, how fast can run the SPI?
- BoonBengT_Altera5 years ago
Moderator
Hi @giomate,
Per my understanding, the SPi core is design to transfer single data word at a time.
As for the baud rates selection between clock, perhaps you can look at the relationship here.
Hope that helps.Warm regards
BB