I have built a configuration around uBlaze processor which includes two separate SPI interfaces, one routed on the FMC connector and the other on the PMOD JA1. I have developed a code that works well with either SPI interface but, when I try to combine both of them together the system is crashing. I believe that my error has to do with the interrupt controller being initialized in both SPI instances but that's trivial to fix.
The interesting part is the following: When I use the PROG button and then upload the firmware both SPI interfaces get properly initialized and the crash happens once I try to do an SPI transfer. However, when I reset the board using the RESET button or try to re-upload the firmware without erasing the configuration first through the PROG button, the system fails at the first SPI initialization .
Similar to the examples for SPI I use the following code part to initialize the SPI system.
In the case of the RESET fail, I noticed that the failure happens on the XSpi_LookupConfig(..) function which returns XST_DEVICE_IS_STARTED, and later on the XSpi_Stop(SpiPtr) returns XST_DEVICE_BUSY.
I can fix the initial bug and get my code running properly, but I cannot understand why the 2nd crash is happening and I really want to figure it out.
Is it possible that some of the AXI devices do not reset properly after a hardware reset? Any input or pointers would be really helpful since I am running out of ideas.
Question
zeroC
I have built a configuration around uBlaze processor which includes two separate SPI interfaces, one routed on the FMC connector and the other on the PMOD JA1. I have developed a code that works well with either SPI interface but, when I try to combine both of them together the system is crashing. I believe that my error has to do with the interrupt controller being initialized in both SPI instances but that's trivial to fix.
The interesting part is the following: When I use the PROG button and then upload the firmware both SPI interfaces get properly initialized and the crash happens once I try to do an SPI transfer. However, when I reset the board using the RESET button or try to re-upload the firmware without erasing the configuration first through the PROG button, the system fails at the first SPI initialization .
Similar to the examples for SPI I use the following code part to initialize the SPI system.
In the case of the RESET fail, I noticed that the failure happens on the XSpi_LookupConfig(..) function which returns XST_DEVICE_IS_STARTED, and later on the XSpi_Stop(SpiPtr) returns XST_DEVICE_BUSY.
I can fix the initial bug and get my code running properly, but I cannot understand why the 2nd crash is happening and I really want to figure it out.
Is it possible that some of the AXI devices do not reset properly after a hardware reset? Any input or pointers would be really helpful since I am running out of ideas.
3 answers to this question
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now