Forum Discussion

dbind2's avatar
dbind2
Icon for New Contributor rankNew Contributor
7 years ago
Solved

programming fails with JAM STAPL Player and MAX10 ( 10m02scu169 )

Hello all,

I'm programming the 10m02soc169 with JAM STAPL Player running on a PC. The PC is connected via uart to a microcontroller that handles the JTAG signals.

I get "device programming failure" with exit code 10 from the JAM STAPL Player and I'm out of ideas what else I could do to find the error. The attached "failure.png" is a screenshot during error.

The readout of the device IDCODE works. So this tells me that the JTAG signals should work.

I was not shure if the JAM file was generated correctly. Therefore I started to debug the JAM file and found out that the exit code with value 10 gets set in an internal variable called V42. Within the JAM file there are only 5 places where this variable gets set to V42. I debugged with the JAM STAPL Player and replaced the relevant instruction "V42 = 10" with "ENDPROC;".

After that the player seemed to work. I attached a screenshot "success.png".

Unfortunately after a power cycle the FPGA still was not configured.

I generate the JAM file from a pof file using Quartus Prime Lite Edition (18.1 or 16.1).

Has anyone experienced programming problems using JAM STAPL Player and MAX10 / 10m02soc169 ?

Or maybe anyone has an idea what to look / check / measure ?

If it helps I could also attach the pof and jam files.

I would be happy about any answer.

Regards,

Dennis

  • Hello all,

    problem is solved and the max10 gets programmed correctly via JAM/JBC player.

    Problem was as follows:

    Due to the limited resources in my microcontroller I had to split the original sources from altera into two parts.

    Part 1 runs on a pc. Part 2 runs in the micro.

    I decided to shift the following functions into the micro (only shifting jbi_jtag_io would lead to very long programming times) :

    jbi_jtag_reset_idle

    jbi_goto_jtag_state

    jbi_do_wait_cycles

    jbi_do_wait_microseconds

    jbi_jtag_drscan

    jbi_jtag_irscan

    jbi_jtag_io

    It was not clear to me, where the jtag state variable gets modified and I thought the microcontroller should be the right place.

    But this was not completely right.

    The state variable gets modified within the functions in the micro and also within the rest of the JAM/JBC player on the pc.

    Therefor the communication between micro and pc needed to be modified.

    The pc always sends the current value for the state variable to the micro and the micro sends the maybe modified state variable back after executing the above mentioned

    functions.

    :-)

    Regards,

    Dennis

6 Replies

  • ShafiqY_Intel's avatar
    ShafiqY_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    Hi Dennis,

    Have you try to program your .pof file using Quartus Programmer?

    Is your .pof file able to program and load into FPGA (configure)?

    Thanks.

  • dbind2's avatar
    dbind2
    Icon for New Contributor rankNew Contributor

    Hi MSHafic,

    thanks for your participation.

    Yes direkt download from Quartus Prime works.

    After a power cycle the FPGA is working.

    Currently I try out two different JAM Files.

    The first is generated from the pof file without the project settings.

    The second is generated automatically during compilation.

    What I see is that the file sizes are very different.

    Regards,

    Dennis

  • dbind2's avatar
    dbind2
    Icon for New Contributor rankNew Contributor

    Hallo all,

    as I described above I generated two different JAM files.

    One direclty generated using the original pof file (size is 86kB).

    And one automatically generated with the quartus prime project settings (size is 162kB).

    The first one is not working and produces the "device programming failure" exit code.

    The second generates another error "device configuration failure".

    I attached a screenshot (device_config_error.png).

    Maybe someone has an idea where to look / check / change ..

    Hope somebody can help.

    Regards,

    Dennis

  • dbind2's avatar
    dbind2
    Icon for New Contributor rankNew Contributor

    Hello all,

    problem is solved and the max10 gets programmed correctly via JAM/JBC player.

    Problem was as follows:

    Due to the limited resources in my microcontroller I had to split the original sources from altera into two parts.

    Part 1 runs on a pc. Part 2 runs in the micro.

    I decided to shift the following functions into the micro (only shifting jbi_jtag_io would lead to very long programming times) :

    jbi_jtag_reset_idle

    jbi_goto_jtag_state

    jbi_do_wait_cycles

    jbi_do_wait_microseconds

    jbi_jtag_drscan

    jbi_jtag_irscan

    jbi_jtag_io

    It was not clear to me, where the jtag state variable gets modified and I thought the microcontroller should be the right place.

    But this was not completely right.

    The state variable gets modified within the functions in the micro and also within the rest of the JAM/JBC player on the pc.

    Therefor the communication between micro and pc needed to be modified.

    The pc always sends the current value for the state variable to the micro and the micro sends the maybe modified state variable back after executing the above mentioned

    functions.

    :-)

    Regards,

    Dennis

  • ShafiqY_Intel's avatar
    ShafiqY_Intel
    Icon for Frequent Contributor rankFrequent Contributor

    dbind2,

    Thank you so much for you feedback and solution regarding to this issue.

    I am glad to hear that the issue is resolved. This really help the communities here if they facing the similar issue in future.

    Really appreciate you effort.

    Thanks.