STM32G070KB support

If you made your own board, post here, unless you built a Maple or Maple mini clone etc
msadeghz
Posts: 9
Joined: Sat Jan 30, 2021 5:01 pm

Re: STM32G070KB support

Post 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 3594 times
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32G070KB support

Post 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.
msadeghz
Posts: 9
Joined: Sat Jan 30, 2021 5:01 pm

Re: STM32G070KB support

Post by msadeghz »

done,
thank you! :)
Last edited by msadeghz on Sun Jan 31, 2021 2:29 pm, edited 1 time in total.
msadeghz
Posts: 9
Joined: Sat Jan 30, 2021 5:01 pm

Re: STM32G070KB support

Post 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.
User avatar
fpiSTM
Posts: 1738
Joined: Wed Dec 11, 2019 7:11 pm
Answers: 91
Location: Le Mans
Contact:

Re: STM32G070KB support

Post 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.
Post Reply

Return to “Custom design boards”