当前位置:网站首页>Gd32 F3 pin mapping problem SW interface cannot be burned

Gd32 F3 pin mapping problem SW interface cannot be burned

2022-07-07 15:38:00 sgmcy

Used GD32F303 As a development

carelessly , Hardware design , Used PA15 Port as SPI Of CS Pin

When debugging at first , Find out SPI The timing of reading and writing is wrong , No data

Then comment out all the code , Separate settings PA15 The port of

But the discovery software can be set , You can also read this PA15 High level or low level

however , Hardware measurement , It is found that the low level or high level of this pin cannot be grasped , unstable

Finally, I found that ,

PA15 This port , Default as JTDI Use , If you want to use it as a general IO Words of mouth , You need to map it before you can use

gpio_pin_remap_config

Call this function to remap ports .

When calling this port , The parameters initially passed are :GPIO_SWJ_DISABLE_REMAP

This can lead to SWJ Out of commission

Pass this parameter ,GPIO_SWJ_SWDPENABLE_REMAP,SWJ It can be used normally. , Download code

 

原网站

版权声明
本文为[sgmcy]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202130612547573.html