PaxInstruments / PaxInstruments-LabWiz-firmware

Firmware for the Pax Instruments LabWiz board.
0 stars 1 forks source link

PCB v0.3 remapping issues #21

Closed charlespax closed 7 years ago

charlespax commented 8 years ago

"There is a pretty serious problem with the alternate pin mappings for I2C1, UART1, and UART3. As soon as the bit is set to remap pins the system locks up and I am seeing the same "can't connect" error we were seeing trying to enable CAN. The good news is that I can identify the exact spot and it is common for the 3 'alternate' pin mapped peripherals, so I think I will be able to nail down what is happening with a few forum posts." -Drew

protological commented 7 years ago

The alternate functions for IOs are enabled by setting bits in a configuration register. the BIT_SET macro that was used by the ST drivers APPEARS to clear the bits associated with the ST Link debugger. The solution was to use REG_MODIFY macro to enable the bits AND keep the debugging bits enabled. Added in commit de8e5eb2ca05b0e9d56dc1546ce4560afa382439 in the stm32f1xx_hal_msp.c file