board_android-IoT/STM32F 2024. 1. 5. 15:52

STM32F103Cx MCU  major(timer, UART, EXTI) function entry names

-STM32F103Cx MCU 주요 함수 시작점 및 KEYPAD용 GPIO port 

<pre> 
1. timer - automatic generated function called in every 1 milisec 
SysTick_Handler() //stm32f1xx_it.c, 
|
+-> HAL_IncTick();
+-> HAL_SYSTICK_IRQHandler() 
    |
+-> HAL_SYSTICK_Callback() ; //main.c  weak void HAL_SYSTICK_Callback() 

2. UART RECV callback - Rx Transfer completed callbacks.
//  * @param  huart  Pointer to a UART_HandleTypeDef structure that contains
//  *                the configuration information for the specified UART module.
__weak void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)  //stm32f1xx_hal_uart.c
--> void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) //main.c 

3. EXTI(external interrupt) callback 
EXTI0_IRQHandler()//stm32f4xx_it.c
|
+->HAL_GPIO_EXTI_IRQHandler() //stm32f1xx_hal_gpio.c 
   +-> HAL_GPIO_EXTI_Callback()  // main.c 


4. Timer callback  - custom timer period timer 
HAL_TIM_IRQHandler(TIM_HandleTypeDef *htim)//stm32f1xx_hal_tim.c
|
+-> HAL_TIM_PeriodElapsedCallback() // main.c 


A. KEYPAD CFG 
const KEYPAD_CfgType KEYPAD_CfgParam[KEYPAD_UNITS] =
{
// KeyPAD Unit 1 Configurations
    {
     /* ROWs Pins Info */
    {GPIOB, GPIOB, GPIOB, GPIOB},
{GPIO_PIN_4, GPIO_PIN_5, GPIO_PIN_6, GPIO_PIN_7},  // input pin

/* COLs Pins */
{GPIOB, GPIOB, GPIOB, GPIOB},
{GPIO_PIN_12, GPIO_PIN_13, GPIO_PIN_14, GPIO_PIN_15} // output pin
}
};

</pre> 

posted by cskimair
:
board_android-IoT/STM32F 2024. 1. 4. 11:59

 

https://www.youtube.com/watch?app=desktop&v=k4WlAfVuXqk

 

> 구글검색:

https://www.google.com/search?q=SPI+TFT+LCD+%2C+ILI9341%2C%ED%95%9C%EA%B8%80+%EC%B6%9C%EB%A0%A5%2C++korean+character&tbm=isch&ved=2ahUKEwjx3tzJ2MCDAxVjc_UHHZ3SBTMQ2-cCegQIABAA&oq=SPI+TFT+LCD+%2C+ILI9341%2C%ED%95%9C%EA%B8%80+%EC%B6%9C%EB%A0%A5%2C++korean+character&gs_lcp=CgNpbWcQA1CdLVjcQWDfQ2gAcAB4AIABjgGIAZEOkgEEMC4xNpgBAKABAaoBC2d3cy13aXotaW1nwAEB&sclient=img&ei=LwyVZbGLPOPm1e8PnaWXmAM&bih=921&biw=1748&client=firefox-b-d#imgrc=jRQqkAhRg48tWM

 

SPI TFT LCD , ILI9341,한글 출력, korean character - Google 검색

아두이노#227] LCD화면(SPFD5408,... m.youtube.com

www.google.com

 

posted by cskimair
:
board_android-IoT/STM32F 2023. 11. 18. 11:39

https://controllerstech.com/send-and-receive-data-to-pc-without-uart-stm32-usb-com/

 

Send and Receive data to PC without UART (STM32 USB COM)

This tutorial will show you how can we use the STM32 USB to send and receive data from the computer, just like we did using the UART

controllerstech.com

 

posted by cskimair
:
board_android-IoT/STM32F 2023. 11. 18. 11:36

CubeIDE , Keil have different requirement for Serial Wire Viewer

 

- CubeIDE :

> _write() redefinition is required

//in CubeIDE, redefinition of _write is ncessary

int _write(int file, char *ptr, int len)

{

for(int i = 0; i < len; i++)

{

ITM_SendChar(*ptr++);

}

return len;

}

https://embedblog.eu/?p=673

 

Using Serial Wire Trace with CubeIDE (aka a new level of debugging) – EmbedBlog

I’ve been developing for STM32’s for a couple of years now, and I did a lot of different projects – from large powersupplies to small headlamps – but on 95 % of them, I used two connectors: SWD (Serial Wire Debug), used to program and debug the chi

embedblog.eu

 

- Keil : 

> fputc() redefinition is required

int fputc(int ch, FILE *f)
{
ITM_SendChar(ch);
return(ch);
}

https://community.st.com/t5/stm32-mcus-products/getting-printf-on-stm32f407-discovery-board/td-p/438840

 

Getting printf on STM32F407 Discovery board

Posted on June 11, 2015 at 13:14 Hi i am new to embedded system programming and stumbled upon this basic problem of re-directing output to the ITM Port0. I read multiple posts on the same but sadly I cant get it to work. I shall try to be as descriptive as

community.st.com

- Tutorial for Keil, serial wire viewer

https://www.keil.com/appnotes/files/discovery_m4_lab.pdf

 

posted by cskimair
:
board_android-IoT/STM32F 2023. 11. 9. 16:10

https://wikidocs.net/160075

 

3.5 SWV 기능

### 3.5.1 printf 사용 printf()의 출력을 LCD에 표시할 수도 있고 serial cable을 통해서 PC의 터미널 콘솔에 표시할 수도 있다. printf…

wikidocs.net

 

 

https://mokhwasomssi.tistory.com/203

 

ST-LINK의 SWO핀을 이용한 printf 함수 사용

개발환경 : STM32CubeIDE MCU : stm32f411ceu6 디버거 : ST-LINK/V2 프로젝트 타입: STM32Cube 프로젝트 리포지토리 : https://github.com/mokhwasomssi/STM32Cube_Example_Project.git mokhwasomssi/STM32Cube_Example_Project Contribute to mokhwaso

mokhwasomssi.tistory.com

 

 

posted by cskimair
:
board_android-IoT/STM32F 2023. 10. 26. 08:59

1. STM32F103CBT6 vs STM32F103C8T6

- 128KB vs 64KB flash memory

 

2. STM32F103CBT6 + SPI_LCD(ILI1394)

- FLASH_PAGE_F1.c 

> https://github.com/controllerstech/STM32/blob/master/FLASH_PROGRAM/F1%20SERIES/FlASH_PAGE_F1.c

 

//#define _64K_FLASH  1      // if 64K FLASH is available
#ifdef _64K_FLASH   //64KB FLASH avaiable , STM32F103C8T6
uint32_t addressTagFlash  =0x0800FC00 ;//0x0800FC00 =>last 1K of 64K flash  ;  or 0x0800F800 for lower 2K range
#else  //128KB flash available , STM32F103CBT6
uint32_t addressTagFlash  =0x0801FC00 ;//0x0801FC00 =>last 1K of 128K flash  ; or 0x0801F800
#endif

......

  Flash_Write_Data( addressTagFlash, (uint32_t *) TagSaveInfo , sizeof( TagSaveInfo) / sizeof(uint32_t)) ;//0x0801FC00: last 1KB of 128KB Flash
  Flash_Read_Data( addressTagFlash, (uint32_t *) temp_TagSaveInfo , sizeof( temp_TagSaveInfo)/sizeof(uint32_t) ) ;

 

-추가

https://community.st.com/t5/stm32-mcus-products/facing-problems-with-saving-data-to-flash-memory-on/td-p/131871

 

Facing problems with saving data to flash memory on stm32g030c8t6.

I tried implementing a driver by following the Flash example present of the GitHub page and a blog I found online: How to Program Flash memory in STM32 » ControllersTech The driver code according to this blog is: STM32/FlASH_PAGE_F1.c at master · contro

community.st.com

 

-F 시리즈는 아래 eeprom emulation을 지원하지 않음.

> https://community.st.com/t5/stm32-mcus-products/how-to-use-flash-memory-as-a-eeprom-in-stm32g071cbt6/td-p/585659

 

How to use flash memory as a EEPROM in STM32G071CBT6

Hello! I'm using the STM32G071CBT6 controller for my project. I need to store certain values in EEPROM for my project, but unfortunately, this controller doesn't have built-in EEPROM functionality. Despite this limitation, I'm determined to find a solution

community.st.com

 

posted by cskimair
: