Nios® II Embedded Design Suite (EDS)
Support for Embedded Development Tools, Processors (SoCs and Nios® II processor), Embedded Development Suites (EDSs), Boot and Configuration, Operating Systems, C and C++
Announcements
Intel Support hours are Monday-Fridays, 8am-5pm PST, except Holidays. Thanks to our community members who provide support during our down time or before we get to your questions. We appreciate you!

Need Forum Guidance? Click here
Search our FPGA Knowledge Articles here.
12367 Discussions

NIOS II - Hanging on ECPQ / SPI initialization

NRugg
New Contributor I
295 Views

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!

0 Kudos
1 Solution
NRugg
New Contributor I
230 Views

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.

View solution in original post

3 Replies
BoonBengT_Intel
Moderator
248 Views

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

NRugg
New Contributor I
231 Views

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.

View solution in original post

BoonBengT_Intel
Moderator
210 Views

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

Reply