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

Legacy microcontrollers Forum Discussions

HaFi_1814386
Level 1
Level 1
First question asked

I  write a Bootloader for a FM4 CY9BF368 with the Standard Frequenz of 160 MHz.

After I change the Program counter

_asm("LDR PC, [R0, #4]");         //Load new program counter address

the Firmware doesn't   start if it is compiled with the Frequenz of 8MHz.

If the Frequenz of the Firmware are change to 160 MHz it works.

Here are the different Settings at System_mb9b360r.h

CLOCK_8MHZ

APBC0_PSR_Val         ( 0x00000000ul)

APBC2_PSR_Val          ( 0x00000080ul)

SCM_CTL_Val              ( 0x0000002Aul)

CLOCK_160MHZ

APBC0_PSR_Val          ( 0x00000001ul)

APBC2_PSR_Val          ( 0x00000081ul)

SCM_CTL_Val               ( 0x00000052ul)

What going wrong ?

Can I change the Frequenz during the lifetime of the bootloader before I jump to the Firmware ?

Thanks,

Harald

0 Likes
1 Solution
HolgerW_56
Employee
Employee
5 sign-ins First comment on KBA 50 replies posted

Dear Harald,

you can switch the clock (Frequency) during run time.

See FM4 Peripheral Manual Main part https://www.cypress.com/file/222996/download chapter 2-1,

and/or PDL Clock Functions (CLK).

Regards,

Holger

View solution in original post

0 Likes
1 Reply
HolgerW_56
Employee
Employee
5 sign-ins First comment on KBA 50 replies posted

Dear Harald,

you can switch the clock (Frequency) during run time.

See FM4 Peripheral Manual Main part https://www.cypress.com/file/222996/download chapter 2-1,

and/or PDL Clock Functions (CLK).

Regards,

Holger

0 Likes