Nios® V/II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® V/II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++

Nios II SPI Slave

Samuel_Loanka
Beginner
562 Views

Hello everyone,

I am working on a project that utilizes SPI (3 Wire Serial) IP as the slave for my Nios. I will get 8 frames of 16-bit data, which will be read by Nios. But somehow the IRQ is only triggered once and I only received the last frame. I followed the Example Test Code provided in the "Embedded Peripherals IP User Guide" and enabled the IRQ in the IP core register for the IRRDY using:

IOWR_ALTERA_AVALON_SPI_CONTROL(SPI_BASE,ALTERA_AVALON_SPI_CONTROL_SSO_MSK | ALTERA_AVALON_SPI_CONTROL_IRRDY_MSK);

But the IRQ still comes once at the end. I checked the SignalTap and discovered that the IRQ is only triggered at the end after the SS_n signal is toggled back to 1, so I will always get the last frame of the data when reading the rxdata. The picture shows the SignalTap when the script is running. Is there any way to trigger the IRQ after every frame of the data?

Thank you

0 Kudos
1 Reply
EricMunYew_C_Intel
Moderator
522 Views

May be you check if you turn on the synchronizer for your slave.


0 Kudos
Reply