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++
公告
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.
12748 讨论

NiosII booting from on-chip memory SPI issue

reubengoh
新分销商 I
26,217 次查看

Hi all,

 

I am using quartus prime 19.1 lite, and I am trying to load a simple SPI program that sends SPI commands using NIOS II processor. The board that I am using is DECA Max10 Development Board. I am able to send "$HELLOABC*" continuously when I load the program in NIOS II SDK debug mode.

 

The problem comes when I try to generate the .hex file using "mem_init_generate" and compile the project in quartus to generate the .pof file. The .pof file that I loaded inside my FPGA is unable to send the "$HELLOABC*" continously. It only sends 2 "$HELLOABC*" and stops abruptly (as attached in spi_output.PNG )

 

I have tried to load a simple led and switch program that basically turns on and off an LED, and I am able to burn it into the FPGA. So I am assuming that my steps to load the .pof file containing the NIOS II application code is correct. 

 

Hence, if anyone can enlighten me about why is this happening to my SPI program? 

Below attached is the hardware of my SPI program, Nios II Application Code and spi_output image from a external logic analyzer.

 

I am using the test code given by Altera SPI Core in the link below. 

https://www.intel.com/content/www/us/en/docs/programmable/683130/23-4/example-test-code.html

While editing it to include a while loop to send the data continuously. I have excluded the ISR to avoid any other issues. 

 

Thanks in Advance,

Reuben Goh

 

 

0 项奖励
1 解答
reubengoh
新分销商 I
22,452 次查看

Hi all, 

 

Just an update to this issue.

 

The problem has been resolved by disabling the alt_printf statement in my C code. My .pof works now, and it can send the spi commands after power cycling the board.

 

My guess is that as there is no communication between the board and the nios2 terminal, the alt_printf pointer got lost when executing the function. Hence when loading .pof, all alt_printf must be disabled.

 

Regards,

Reuben Goh

在原帖中查看解决方案

0 项奖励
45 回复数
wwanalim_intel
2,275 次查看

Hi,


We are still debugging on the design, sorry for the delay.


0 项奖励
wwanalim_intel
2,248 次查看

Hi,


Is there any new update on this issue?


0 项奖励
reubengoh
新分销商 I
22,453 次查看

Hi all, 

 

Just an update to this issue.

 

The problem has been resolved by disabling the alt_printf statement in my C code. My .pof works now, and it can send the spi commands after power cycling the board.

 

My guess is that as there is no communication between the board and the nios2 terminal, the alt_printf pointer got lost when executing the function. Hence when loading .pof, all alt_printf must be disabled.

 

Regards,

Reuben Goh

0 项奖励
wwanalim_intel
2,233 次查看

I’m glad that your question has been addressed, I now transition this thread to community support. If you have a new question, Please login to ‘https://supporttickets.intel.com’, view details of the desire request, and post a feed/response within the next 15 days to allow me to continue to support you. After 15 days, this thread will be transitioned to community support. The community users will be able to help you on your follow-up questions.


0 项奖励
回复