- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So in our system we've recently added an EPCS/EPCQ flash controller IP. We've regenerated the BSP, it has all the fancy new files, and we're building in NIOS land.
However, when the NIOS application comes up, it runs the HAL initialization routines (alt_main), one of which is
ALTERA_AVALON_EPCS_FLASH_CONTROLLER_INIT
In the above routine, we attempt to read the electronic signature. In doing this we send out an alt_avalon_spi_command(). In this function, we hang infinitely on the following code
/* Wait until the interface has finished transmitting */
do
{
status = IORD_ALTERA_AVALON_SPI_STATUS(base);
}
while ((status & ALTERA_AVALON_SPI_STATUS_TMT_MSK) == 0);
I can see the registers mentioned above not changing. Specifically, I am getting a TRDY (transmitter ready) and RRDY (Receiver ready) bits set. Both of those bits need to be set to 0 in order to exit this infinite loop.
So my question becomes, is there some necessary setup item to be able to talk with EPCS flash that I'm missing? All of the routines that get called up until this point are in the BSP, and from my understanding we should never have to edit the BSP files. This leads me to believe there is some setting in Quartus / NIOS II EDS that is getting missed.
Thanks so much in advance for any help you can provide!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your time, but I was actually able to find the solution to this recently.
As it turns out, the issue was entirely configuration related. We added the EPCQ IP to the build, but forgot to actually flash the chip with the new fabric image. So we were trying to access EPCQ registers but the fabric image didn't know how to handle it.
So if you see this issue, make sure you have the latest and greatest fabric flashed onto your device! This was entirely the source if my issue.
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @NRugg,
Thank you for posting in Intel community forum and hope this message find you well.
What are the configuration device used?
Which hardware board are involved and also which version of quartus are involved?
Note: on for the time being maybe would recommend to refer to the link here for EPCS guide which contain the details configuration steps.
Warm regards.
BB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thanks for your time, but I was actually able to find the solution to this recently.
As it turns out, the issue was entirely configuration related. We added the EPCQ IP to the build, but forgot to actually flash the chip with the new fabric image. So we were trying to access EPCQ registers but the fabric image didn't know how to handle it.
So if you see this issue, make sure you have the latest and greatest fabric flashed onto your device! This was entirely the source if my issue.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi @NRugg,
Good to know that it is working now, we would be closing the thread. If you have further queries, Please do post a response in the next 15 days.
After 15 days, this thread will be transitioned to community support. The community users will be able to help you with your follow-up questions.
Warm Regards
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page