Skip to content

Implement various module drivers based on STM32F130C8T6 (Balk fill dev board)

Notifications You must be signed in to change notification settings

taejin-seong/STM32F103XX-Module-Libraries

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 

Repository files navigation

Dev environment

IDE

  • STM32CubeIDE 1.6.0
  • STM32CubeMX

Development Board

  • STM32F103C8T6 (Black Pill Board)

Component

Part Name Image Link Implementation
DFplayer Mini 📌
NRF24L01 📌
1602 CLCD With I2C 📌
8*8 Dot Matrix With MAX7219 📌

Where's the file?

📂
DFplayer Mini

-   stm32f103_fw_module → src → common → hw → include → dfplayer.h
-   stm32f103_fw_module → src → hw → driver → dfplayer.c
-   stm32f103_fw_module → src → ap → ap.c → void apDFPlayerTest(void){...}

NRF24L01

-   stm32f103_fw_module → src → common → hw → include → nrf24l01.h
-   stm32f103_fw_module → src → hw → driver → nrf24l01.c
-   stm32f103_fw_module → src → ap → ap.c → void apNRF24L01TxTest(void){...}
-   stm32f103_fw_module → src → ap → ap.c → void apNRF24L01RxTest(void){...}

1602 CLCD With I2C

-   stm32f103_fw_module → src → common → hw → include → clcd.h
-   stm32f103_fw_module → src → hw → driver → clcd.c
-   stm32f103_fw_module → src → ap → ap.c → void apCLCDTest(void){...}

8*8 Dot Matrix With MAX7219

-   stm32f103_fw_module → src → common → hw → include → max7219.h
-   stm32f103_fw_module → src → common → hw → include → max7219_dotmatrix.h
-   stm32f103_fw_module → src → hw → driver → max7219.c
-   stm32f103_fw_module → src → hw → driver → max7219_dotmatrix.c
-   stm32f103_fw_module → src → ap → ap.c → void apDotMatrixTest(void){...}

Port Allocation Table

📌




Cube MX Setting

Clock Configuration

📌
• Using HSE (High Speed External)





Pinout

📌




Peripheral & Core Configuration

1. UART1 & UART2

📌
• The parameters of uart1 & uart2 are the same
• You can change parameter settings in uart.c



2. SPI1 & SPI2

📌
• You can change parameter settings in spi.c

SPI1



SPI2



3. I2C1

📌
• You can change parameter settings in i2c.c



4. GPIO

📌


5. DMA

📌
USART1,USART2 DMA Request Setting
     - [USART1_RX, USART2_RX] :  Mode → Circular
     - [USART1_TX, USART2_TX] :  Mode → Normal (All Default)



6. NVIC

📌



How to use

테스트를 하기 위해서는 stm32f103_fw_module → src → main.c 에서 주석을 해제 또는 설정해야 합니다.

#include "main.h"

int main(void)
{
	hwInit();
	apInit();

/* Choose  Test Function */

  	apBoardTest();
//	apUartTest();
//	apGpioTest();
//      apDFPlayerTest();
//	apNRF24L01RxTest();
//	apNRF24L01TxTest();
//      apCLCDTest();
//      apDotMatrixTest();

    return 0;
}

Note

1.

clcd.hmax7219.h의 #define에서 0x00~0x0f 부분이 중복되어 오류가 발생합니다. 따라서 clcd와 dot matrix는 동시에 테스트할 수 없습니다. 양쪽(clcd & dot matrix)을 동시에 테스트하려면 max7219.h의 #define 0x00 ~0x0f 부분을 static const하게 선언하여 사용해야합니다.

An error occurs due to overlapping parts 0x00~0x0f in #define of clcd.h and max7219.h. Therefore, clcld and dot matrix cannot be tested at the same time. To test both simultaneously (clcd & dot matrix), you must use the static const declaration of #define 0x00 ~ 0x0f (max7219.h).

2.

프로젝트를 빌드할 때는 다음 경로에 있는 폴더를 빌드 및 디버그 항목에서 제외해야 합니다.
When you build a project, you must exclude folders in the following paths from the build and debug entries:

  • stm32f411ceu6_fw_module → src → lib → Core

How to exclude

📌
• Click Core folder and proceed with the following steps.

   



• The results are as follows.





Test Pic

🚩
DFplayer Mini


NRF24L01


1602 CLCD With I2C


8*8 Dot Matrix With MAX7219


Refer to

8x8 Dot Matrix : https://github.com/eziya/STM32_HAL_MAX7219_8x8_MATRIX

About

Implement various module drivers based on STM32F130C8T6 (Balk fill dev board)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published