Hi @gauravmore
I hope you are doing well , many thanks for your reply!
Regarding the MCU not being able to boot without a debug probe: I have not seem problems with your boot pin configuration. I think we may also take a closer look at the reset pin , to check whether it is affecting the boot process or not. Normally Debug probes handle the reset pin , and provide the required voltage and logic levels.
Another thing to review . From your source code I have seen that for the LED blink you called the function board LED set (to set pin state ), then you the toggle function:
Board_LED_Set(0, true);
#endif
#endif
// TODO: insert code here
// Force the counter to be placed into memory
volatile static int i = 0 ;
// Enter an infinite loop, just incrementing a counter
while(1) {
__asm volatile ("nop");
Board_LED_Toggle(1);
But I have not seen a call to the function Chip_GPIO_SetPinDIROutput() (to set the pin as an output). . When you are running with a debug session , are you able to see the LED blinking properly , right?
Regarding My expectation is , if assigned a variable in the external memory location and i simply called the variable and copied the data on to the variable, then will it simply copy?
Unfortunately , with the flash is different. it does not have the access properties than the SDRAM. When we need to write/read the flash from the application ; on many MCUs , to avoid data collision , it is required to run flash access routines from SRAM. For example the SPIFI Library provides APIs such as
spifi_program() or spifi_read(), below the definition of one of them,
/**
* @brief Program the device with the passed buffer
* @param pHandle : Pointer to a LPCSPIFILIB device handle
* @param addr : LPCSPIFILIB device address to start write at
* @param writeBuff : Address of buffer to write, must be 32-bit aligned
* @param bytes : Number of bytes to write
* @return A SPIFI_ERR_xxx error code (SPIFI_ERR_NONE is no errors)
* @note This function has no size limit. This function only works in blocking mode.
*/
SPIFI_ERR_T spifiProgram(const SPIFI_HANDLE_T *pHandle, uint32_t addr, const uint32_t *writeBuff, uint32_t bytes);
You mentioned that you are intending to store critical data on the flash. Do you want to avoid loosing critical data on a situation like a power loss or something similar?
BR,
Diego.