Who calls initialize_psoc()?

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

cross mob
Anonymous
Not applicable

Hello, I am ramping up on PSoC4 BLE using PSoC Creator with gnu toolchain (the default).  I generated a blink project using TCPWM, and reading the auto-generated code to understand how the device boots.   I just read AN60616 and currently am reading AN73854, but so far do not understand how the function initialize_psoc(), which configures all registers and sets up clocking, etc is called for the GNU case.  Can anyone shed some light for me please?

0 Likes
3 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

In cyboot the configuration data get stored into the configuration registers. Choices in the system tab depending on chip used allow for compressed, uncompressed and DMA transfer. All this is done before main() is called. Cyboot does a rather complex job as starting the clocks up to the defined frequencies and setting the dividers, checking the main clock sources for proper running, setting up the components and lastly setting the IO-pins from hi-z to the defined state and drive modes. All this is done automatically and has nothing to do with your GCC toolchain. Just pre-written Cypress software.

   

 

   

Bob

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

You will find this (after a build) in Cm0Start.c -

   

 

   

/*******************************************************************************
* Function Name: Reset
********************************************************************************
*
* Summary:
*  This function handles the reset interrupt for the RVDS/MDK toolchains.
*  This is the first bit of code that is executed at startup.
*
* Parameters:
*  None
*
* Return:
*  None
*

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable

Thank you Bob and Dana, I was able to answer my own question by looking up the documentation on the constructor gcc attribute, and setting a breakpoint in initialize_psoc() in the debugger.

0 Likes