Modify SPI register
Hello Everyone,
I am working on the STM8AL3166 and try modify the SPI register.
My simple code is as below :
int main() {
SPI_CR1 |= 0b00100100; /* Configure as master and 500 kHz com speed
}
As read in the datasheet, I made a library.h with the correct address :
//STM8AL3166 SPI REGISTER
#define SPI_CR1 *(unsigned char*) 0x5200 //SPI Control Register 1But when I go in the debug session, the register does not change his value after executing the instruction
Is someone has encountered this problem? When I do the same for GPIO port A for instance, I have no problem.
May I am missing one configuration somewhere?
Please help.
Thank you for your time,
David
