This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

NRF 52832 Free-rtos timer causing hardfault

Hello ,

I am using NRF 52 DK board and SDK15.3.0 .

I have tested \examples\peripheral\blinky_freertos code and its working fine .

but the same code ( in that code , one task ans one timer is created ), if I port to examples\ble_peripheral\ble_app_hrs code ( added NRF_LOG_INFO in the timer callback instead of led toggle ). It works for once and shows hardfault error.

Below is the code I am running

main(){

bool erase_bonds;
log_init();
clock_init();
//xTaskCreate(pixart_task, "Pixart_sensor", 300, NULL, 2, &handle_pixart_task);


timer_handle = xTimerCreate( "timertest", 5000, pdFALSE,NULL, led_toggle_timer_callback);
if(timer_handle != NULL){
xTimerStart(timer_handle, 0);
}
/* Activate deep sleep mode */
// SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;

vTaskStartScheduler();
//===============================================================================================

for (;;)
{

}

}

and below is the error I am getting : 

<info> app:
timer callback 1 >>>>>>>>>>>
<error> hardfault: HARD FAULT at 0xFFFFFFFF
<error> hardfault: R0: 0xFFFFFFFF R1: 0xFFFFFFFF R2: 0xFFFFFFFF R3: 0xFFFFFFFF
<error> hardfault: R12: 0xFFFFFFFF LR: 0xFFFFFFFF PSR: 0xFFFFFFFF
<error> hardfault: Cause: The processor has attempted an illegal load of EXC_RETURN to the PC, as a result of an invalid context, or an invalid EXC_RETURN value.

Parents Reply Children
No Data
Related