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.

CC2531 Serial Boot loader question

Other Parts Discussed in Thread: CC2530, CC2531

Hi,

I base on Z-Stack2.4.0-1.4.0 and follow the document with Serial Boot Loader For CC253x SOC(SWRA327)

I use the Boot  loader base the below folder program into CC2530(for CC2530 Boot) first

Projects\zstack\Utilities\BootLoad\CC253x\Boot.eww

Next step follow the document create the *.bin file with GenericApp then via the SBDemo.exe upgrade the firmware is no problem.

The same procedures on CC2531 CDC mode run serial bootloader have some question.

Step1. Downlaod the CC2531 Boot loader then the LED1(Green) will start blinking wait the image data.

Step2. Create the *.bin include the CDC driver base on GenericApp for CC2531(This GenericApp have tested ok with CDC driver)

Step3. Via SBDemo.exe upgrade the firmware.After upgrade success the LED1 and LED2 will start flashing then press the SW2 to jump to application image

The PC with Boot loader stage can identify the CC2531 CDC device, but after jump to the application image,PC will not identify the CDC device, it become a nuknown device on PC side. But I use the packet sniifer to check the RF packet is right action.

So the application image should be work, but the CDC driver will fail with PC side.

I don't know what problem at this part?

I have check the ZNP project have workspace "CC2531-ProdSBL" for this part. The tested result is same fail on CDC driver with PC side.

Can you assistant me this issue?

Ethan

Thank you

  • Have you check the USB interrupt is re-direct to your applications interrupt table ?

  • Hi Jerry,

    Do you mean modify the interrupt_stubs.s51 with CC2531 Boot Loader?

    The original code have mark this part.

    I have to modify it to maping the interrupt table.

    ORG     0x0033      ; Port 2 inputs - used by USB library.
    LJMP  $ + OFFSET

    The will have warning message:

    Warning[w52]: More than one definition for the byte at address 0x33 in common segment INTVEC. It is defined in module "sb_main" as well as in module "interrupt_stubs"

    And the tested status is same by before tested.

    What point need to take care with...?

  • Ethan,

    I want to clarify that whether your application can receive the USB interrupt or not.

    Just set a break point any where in the usbirqHandler() in your app. You will find whether your app receive the interrupt after jump to your app.

    If not, in CC2531 bootload sb_main.c function:

    HAL_ISR_FUNCTION( usbISR, P2INT_VECTOR )
    {
      if (magicByte == SB_STACK_VALUE)
      {
        void (*usbFunc)(void);
        usbFunc = (void (*)(void))0x2033;
        usbFunc();
      }
      else if (magicByte == SB_MAGIC_VALUE)
      {
        usbirqHandler();
      }
      else
      {
        asm("NOP");  // Not expected.
      }
    }

    which will direct the interrupt to bootloader or your app depend on the value in magicByte. You can set the magicByt to SB_STACK_VALUE at  very beginning of your app's mian().

    Jerry

  • Hi Jerry,

    Thank your help.

    It's ok.

    Ethan