FX3U code ready

This commit is contained in:
2024-09-27 15:46:12 +03:00
parent b9942f2e9f
commit 1b73ebad2c
8 changed files with 346 additions and 55 deletions

View File

@@ -85,8 +85,10 @@ void gpio_setup(void){
// PD0 & PD1 (CAN) setup in can.c; PA9 & PA10 (USART) in usart.c
RCC->APB2ENR |= RCC_APB2ENR_IOPAEN | RCC_APB2ENR_IOPBEN | RCC_APB2ENR_IOPCEN | RCC_APB2ENR_IOPDEN |
RCC_APB2ENR_IOPEEN | RCC_APB2ENR_AFIOEN;
// Turn off JTAG/SWD to use PA14
// Turn off JTAG/SWD to use PA14 (I don't know why, but here it doesn't work, need to repeat in can.c)
#ifndef EBUG
AFIO->MAPR |= AFIO_MAPR_SWJ_CFG_DISABLE;
#endif
// be sure that all OK
// __ISB();
// __DSB();