Can't set character match bits in USART_CR2
I'm trying to generate a reset on a USART receive character match on the F3 Discovery board. If I understand the user manual, I need to set bits 31:24 of USART_CR2 to be the character I want to match. The problem is that I cannot change those bits. I can change other bits, such as bit 23 of CR2. I made sure I set RE=0 as the user manual says to do. Is there something else I need to do to set the match character? Does anyone have code that generates an interrupt on match?
Here is how I was trying to set the match character: uint32_t reg; reg = (uint32_t)USART1->CR1; reg &= (uint32_t)0xfffffffb; USART1->CR1 = (uint32_t)reg; // This works. I can read back the changed value. reg = USART1->CR2; reg |= (uint32_t)0x96000000; // A tilde character USART1->CR2 = (uint32_t)reg; // This does not work. CR2 is unchanged.Any suggestions would be greatly appreciated!--Osman #character_match #usart_cr2