Page 2 of 2

Re: STM32G070KB support

Posted: Sun Jan 31, 2021 1:58 pm
by msadeghz
fpiSTM wrote: Sun Jan 31, 2021 1:51 pm Ahah! I've just remember why it does not work with USART1. ;)
This is linked to the pin used: PA9/PA10.
On G0 those pins could be remapped on PA11/PA12.

https://github.com/stm32duino/Arduino_C ... ssues/1180

This will be fixed in the next core release. As a workaround, simply comments the code described here:
https://github.com/stm32duino/Arduino_C ... -696617262
I have connected the uart1 pins to PA9 and PA10:
Capture.PNG
Capture.PNG (40.99 KiB) Viewed 3749 times

Re: STM32G070KB support

Posted: Sun Jan 31, 2021 2:08 pm
by fpiSTM
yes, that's why it doesn't work with the current version of the core you used. in fact the core remap to the pin 22/23.
So simply comment the code as mentioned in the GH issue and no remap will be done.

Re: STM32G070KB support

Posted: Sun Jan 31, 2021 2:20 pm
by msadeghz
done,
thank you! :)

Re: STM32G070KB support

Posted: Mon Feb 01, 2021 6:46 am
by msadeghz
fpiSTM wrote: Sun Jan 31, 2021 2:08 pm yes, that's why it doesn't work with the current version of the core you used. in fact the core remap to the pin 22/23.
So simply comment the code as mentioned in the GH issue and no remap will be done.
thank you,
now I want to use spi,
I give 0xFF when want to read a register, I have checked by oscilloscope which the spi slave chip sends 0x11 but in the arduino give 0xff.
I have checked pinout and variant configs. but can't find the reason.

Re: STM32G070KB support

Posted: Mon Feb 01, 2021 7:14 am
by fpiSTM
By default SPI instance uses pin 11/12/13 respectively MISO/MOSI/SCLK.
So you have to check that they are properly define to use the same SPIx peripheral.
Pin 10 is used as SS by default.