Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
air
Level 2
Level 2
First like given 50 sign-ins 10 questions asked

 Hello,

 

I am using cy8c6136.

I am using the modified basic DFU bootloader project by me.

I write the bootloader.hex file into the blank state MCU and dfus APP1 using dfuh-tool.

There’s no problem here.

 

But, in a specific situation (button input and using enterDFU() ) in APP1, the bootloader does not run.

APP1 seems to be executed immediately without going through bootloader.

The reason is that there is no port output(about 5 Sec) in the bootloader main() inserted by me.

 

APP1 is an IAR project, and the *.icf file has been modified.

I attach the bootloader project and APP1 config file.

The common_ram part is for determining whether the bootloader proceeds DFU.

I would like some help on which part is the problem.

 

Thank you.

 

 

#define BOOTLOADER_ID  (0u)      // App ID of bootloader

void enterDFU(void)

{

   dbg("DFU mode start!!!");

   common_ram->validMark = COMMON_RAM_VALIDT_MARK;

   common_ram->dfuMark = DFU_START_MARK;

   common_ram->dfuState = 0;

   common_ram->dfuStatus = 0;

 

   Cy_DFU_ExecuteApp(BOOTLOADER_ID);

//  CySoftwareReset();

}

0 Likes
2 Replies
lock attach
Attachments are accessible only for community members.
air
Level 2
Level 2
First like given 50 sign-ins 10 questions asked

I forgot to attach files.

0 Likes
air
Level 2
Level 2
First like given 50 sign-ins 10 questions asked

I have an additional question.

I wonder why the ram_common area and the .noinit area are different after build.

 

/* The noinit section, used across all the applications */
.cy_boot_noinit (NOLOAD) :
{
KEEP(*(.cy_boot_noinit));
} > ram_common

 

air_0-1667894373053.png

 

0 Likes