Disable FLASH wait states
As it blocks the mc from reaching a ready state for unknown reason(s)
This commit is contained in:
15
build/main.i
15
build/main.i
@@ -2200,7 +2200,7 @@ struct flash {
|
||||
#define FLASH_ACR_ICEN_ENABLE (1 <<FLASH_ACR_ICEN_BIT)
|
||||
|
||||
|
||||
#define FLASH_ACR_LATENCY_3_WAIT_STATES (0x0111)
|
||||
#define FLASH_ACR_LATENCY_3_WAIT_STATES (0b0011)
|
||||
|
||||
#define FLASH_ACR_LATENCY_BIT 0
|
||||
#define FLASH_ACR_LATENCY_MASK (0b1111)
|
||||
@@ -2371,8 +2371,9 @@ static void system_clock_init(void) {
|
||||
((struct flash *) (0x40023C00U))->ACR |= (1 <<9);
|
||||
|
||||
|
||||
((struct flash *) (0x40023C00U))->ACR &= ~((0b1111) << 0);
|
||||
((struct rcc *) (0x40023800U))->CFGR |= ((0x0111) << 0);
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
((struct rcc *) (0x40023800U))->CFGR |= (((0b10) & (0b11)) << 0);
|
||||
@@ -2396,13 +2397,13 @@ int main(void) {
|
||||
|
||||
uint16_t counter = ((struct timer *) (0x40000800U))->CNT;
|
||||
|
||||
# 89 "src/main.c" 3 4
|
||||
# 90 "src/main.c" 3 4
|
||||
_Bool
|
||||
# 89 "src/main.c"
|
||||
# 90 "src/main.c"
|
||||
led_on =
|
||||
# 89 "src/main.c" 3 4
|
||||
# 90 "src/main.c" 3 4
|
||||
((_Bool)+0u)
|
||||
# 89 "src/main.c"
|
||||
# 90 "src/main.c"
|
||||
;
|
||||
while(1) {
|
||||
if ((((struct timer *) (0x40000800U))->CNT - counter) >= 250) {
|
||||
|
||||
Reference in New Issue
Block a user