This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

F29H850TU: CRC8 using CRC_run8BitAsm stuck

Part Number: F29H850TU


Tool/software:

Hello Experts, 

I am working with CRC8 using CRC_run8BitAsm, as described in example crc_8_example for C29x DSP.

This example runs on my Laptop, but when I introduce the same example into my code, I have some trouble making it run. 

This is the comparison of disassembly files right side is my code, and left is from CRC8 example. 




Maybe first just guide me, what could have gone wrong. Something is missing I feel, but I cant find out. as all the compiler and linker flags as same, and source code is also the same.

Thanking you in advance

Kind Regards
Deep Ganatra
 

  • Hello,

    The CRC expert is on leave and expected to be back next week. In the meantime let me see if I can help.

    Can you please clarify on what went wrong, what is the behavior that you're seeing right now? The difference between the two assembly function from that I can tell is that your application has the protected call stack whereas the example code did not.

    I believe you have setup SSU modes and regions in your application code, which is what instruct the compiler to insert the "ENTRY1.PROT || ENTRY2.PROT" as part of the protected call stack implementation. This would prevent any illegal access to or from the current code routine, and if it was setup incorrectly (registered as an illgeal access), depending on the types it could either skip the function call, or signals the error aggregator which triggers a NMI interrupt.

    Best,

    Sen Wang

  • Hello Sen, 

    It gets stuck at that address 0x20100000 and the Controller restarts again and again.

    I figured out, within the Flash configuration, it loads the following sections

    // crc_8 example specific sections
    SECTIONS
    {
      kernel_asm > SRAM_LPAx
      kernel_opt > SRAM_LPAx

    }


    And as I was flashing it using .hex file and not the .out file, it somwhow didn't flash these sections correctly. 

    Maybe this is an error in the example? 

    I solved it using this 

        kernel_asm    : {} LOAD=FLASH, RUN=SRAM_LPAx, table(BINIT), palign(8)
        kernel_opt    : {} LOAD=FLASH, RUN=SRAM_LPAx, table(BINIT), palign(8)

    Regards 
    Deep Ganatra
  • Thank you so much the catch!

    This is definitely an error in the example for flash configurations. kernel_asm and kernel_opt should have resides in FLASH and load to RAM at startup. I'll file an internal inquiry to get this resolved.

    Best,

    Sen Wang