본문 바로가기
프로그래밍/STM32F Tutorial

STM32에서 Flashloader 활용 Uart로 bin 파일 다운로드

by choies1 2016. 6. 11.

참조

1) http://stm32f4-discovery.net/2014/09/program-stm32f4-with-uart/

 

Program STM32F4 with UART - STM32F4 Discovery

STM32F4 devices have great feature. They can be programed with only USB to UART converter. Each device has bootloader inside, which supports UART programming. This is not very great method for Discovery boards, because they have better and faster solution

stm32f4-discovery.net

2) 칩마다 사용하는 Uart 포트가 다르다. 아래 링크 참조하여 자신의 칩에 맞는 Uart 포트를 이용하자.

 

http://www.st.com/content/ccc/resource/technical/document/application_note/b9/9b/16/3a/12/1e/40/0c/CD00167594.pdf/files/CD00167594.pdf/jcr:content/translations/en.CD00167594.pdf

 

 

기본적으로는 위의 참조 사이트에 나와있는 방법을 이용하면 Uart 포트로 Flash Loader Demonstrator를 이용하여 bin 파일을 다운로드 할 수 있다.

 

Flash loader demonstrator opened

 

여기서 주의할 점은 Uart의 경우 칩마다 다운로드 가능한 Uart 다르게 정해져 있다는 것이다.

 

참고로 STM32F4 Discovery는 STM32F407을 이용한다. 이 경우 Uart 포트는 다음과 같다.

 

 

 

 

여기서 STM32F4 Discovery는  USART1 (PA9, PA10)를 USB쪽에서 쓰고 있어서, USART3 중 PB10, PB11과 PC10, PC11을 이용하라고 하는데, 둘다 이용해 봤는데 모두 동작되는 것을 확인했다.

 

만약 사용하는 보드가 STM32F411 Discovery 보드라면 다음을 참조하면 된다.

 

 

위에서 보듯이 USART1과 USART2 이용만 가능한데, 역시 USART1의 PA9, PA10은 USB쪽에 이용하고 있으니, USART2인 PD5, PD6을 이용하도록 하자.