how about a reset reason getter and resetter in the stm32_rcc.h files? Anybody here who needs that too?
At the moment i do this direct via CMSIS register access.
Maybe something like this:
Code: Select all
#define rccClearResetReason(){ \
RCC->CSR |= RCC_CSR_RMVF \
}
#define rccGetResetReason() RCC->CSR & ( RCC_CSR_LPWRRSTF | RCC_CSR_WWDGRSTF | RCC_CSR_IWDGRSTF | RCC_CSR_SFTRSTF | RCC_CSR_PORRSTF | RCC_CSR_PINRSTF)
Thanks