cancel
Showing results for 
Search instead for 
Did you mean: 

stm32wl5moc: With breakpoint the micro updates the data without breakpoint no

Sto usando questo microcontrollore stm32wl5moc e in particolare il core M4. Uso due funzioni in linea per leggere e aggiornare i valori delle mie variabili. Accesso alle variabili tramite puntatori. Quando sono in modalità di debug su Live Expressions, le variabili non aggiornano il loro valore. Potrebbe sembrare un problema di puntatore, ma non lo è. Se inserisco un punto di interruzione prima di chiamare la funzione per aggiornare la variabile sulle espressioni live, vedo i nuovi dati. Se non si imposta il punto di interruzione, i dati rimangono zero. Il sistema utilizza il sequencer.

I'm using this stm32wl5moc microcontroller and specifically the M4 core. I use two inline functions to read and update the values ​​of my variables. Accessing variables via pointers. When in debug mode on Live Expressions, variables do not update their value. This might seem like a pointer problem, but it's not. If I insert a breakpoint before calling the function to update the variable on live expressions, I see the new data. If you do not set the breakpoint, the data remains zero. The system uses the sequencer.

Any idea why it doesn't update the values?

static inline uint16_t OTController_GetPduVal(otcontroller_handler_t *phOtcontroller, offset uint16_t )
{
return *(uint16_t*)((uint8_t*)(&phOtcontroller->otControllerPdu) + offset);
}

static inline void OTController_SetPduVal(otcontroller_handler_t *phOtcontroller, uint16_t offset, uint16_t pduVal)
{
*(uint16_t*)((uint8_t*)(&phOtcontroller->otControllerPdu) + offset) = pduVal;
}
2 REPLIES 2
STTwo-32
ST Employee

Hello @Electronic_firmware 

Could you please add more details about your issue in the English language to make it easy to understand.

Best Regards.

STTwo-32

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Optimization and volatility might play a role.

Personally I'd suggest you instrument your code so it can provide real-time information about data and flow. Say via UART or SWV/SWO

The debugger and these inspection tools can be overly invasive at times.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..