Other Parts Discussed in Thread: TM4C1294KCPDT
Hello,
I work with TM4C1294KCPDT Microcontroller
In Boot Loader I need to turn off certain GPIO pin immediately after power up.
In Reset Vector I moved my function call to the first place to be performed, but still visible a light blinking of peripheral that connected to this GPIO.
Here is related Boot Loader code:
#define BL_HW_INIT_FN_HOOK GPIO_WLS600_Configure
.thumbfunc ResetISR
ResetISR: .asmfunc
;; Call the user-supplied low level hardware initialization function
.ref BL_HW_INIT_FN_HOOK
bl BL_HW_INIT_FN_HOOK
;; Enable the floating-point unit.
movw r0, #0xED88
movt r0, #0xE000
ldr r1, [r0]
orr r1, r1, #0x00F00000
str r1, [r0]
;; Initialize the processor.
bl ProcessorInit
void GPIO_WLS600_Configure()
{
// init and turn laser GPIO off
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOC);
ROM_GPIOPadConfigSet(GPIO_PORTC_BASE, GPIO_PIN_7, GPIO_STRENGTH_2MA, GPIO_PIN_TYPE_STD_WPU);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTC_BASE, GPIO_PIN_7);
*((volatile uint32_t *)(GPIO_PORTC_BASE + 0x3FC)) |= GPIO_PIN_7; // invert logic
// init Heartbeat LED
ROM_SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOM);
ROM_GPIOPinTypeGPIOOutput(GPIO_PORTM_BASE, GPIO_PIN_6);
MAP_GPIOPadConfigSet(GPIO_PORTM_BASE, GPIO_PIN_6, GPIO_STRENGTH_12MA, GPIO_PIN_TYPE_STD);
// Default the LED to ON.
ROM_GPIOPinWrite(GPIO_PORTM_BASE, GPIO_PIN_6, 0);
}
I looks like processor does not sets the value in time.
How can I get rid off GPIO slow response on power up?
Sergey