'embeded/Cortex-M3 STM'에 해당되는 글 22건

  1. 2021.08.09 stm32 wdg 최대 설정시간
  2. 2021.08.02 stm32 RST pull-up reset fail
  3. 2021.07.02 STM32 RDP(ReaD Protection)
  4. 2021.02.04 stm32 uart echo
  5. 2021.02.03 STM32CubeIDE / HAL register callbacks
  6. 2021.02.02 STM32CubeIDE 주의사항(?)
  7. 2021.02.02 STM32F103 관련 용어
  8. 2018.02.12 CMSIS for stm32
  9. 2017.12.11 stm32 DMA 관련글들
  10. 2017.01.10 cmsis printf
embeded/Cortex-M3 STM2021. 8. 9. 17:02

stm32에서 와치독으로는 40 KHz의 RC 클럭이 들어간다.

 

그리고 prescaler는 4/8/16/32/64/128/256 뿐이고

 

다운카운터는 0~4095가 설정가능 범위

 

입력 클럭을 40k로 잡고 프리스케일러에 따른 클럭을 계산하고

타겟 시간을 2초로 잡아보면, 4095가 최대 값이니, prescaler는 16 이상으로 쓰면 가능!

 

미친척 하나씩 대입해보니 STM32에서 설정 가능한 와치독 최대 시간은 26초.

(그런데 와치독을 25초 가까이 쓸일이 있나 싶긴 한데...?)

[링크 : https://blog.naver.com/namunny/220393603436]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 reset 없이 JTAG 붙이기  (0) 2023.07.19
STM32H/STM32G 시리즈 시리얼 포트 데이터 order  (0) 2022.08.29
stm32 RST pull-up reset fail  (0) 2021.08.02
STM32 RDP(ReaD Protection)  (0) 2021.07.02
stm32 uart echo  (0) 2021.02.04
Posted by 구차니
embeded/Cortex-M3 STM2021. 8. 2. 19:57

리셋핀에 강하게 외부에서 풀업이 걸려있을 경우

내부 리셋에 의해서 리셋이 되지 않는 문제가 발생하지 않는다.

 

어쩌면 HAL_SystemReset() 함수가 리셋핀을 조작해서 자기 자신이 스스로 LOW로 낮춤으로

물리적은 하드웨어 리셋을 구현해놨는데 외부에서 풀업이 걸려있으면 내릴수가 없으니

리셋이 안걸리는거 아닐려나?

 

 

 

[링크 : https://kaizen8501.tistory.com/26]

[링크 : https://community.st.com/s/question/0D53W000006EROWSA4]

[링크 : https://community.st.com/s/question/0D50X00009XkZUg/problem-with-nvicsystemreset]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32H/STM32G 시리즈 시리얼 포트 데이터 order  (0) 2022.08.29
stm32 wdg 최대 설정시간  (0) 2021.08.09
STM32 RDP(ReaD Protection)  (0) 2021.07.02
stm32 uart echo  (0) 2021.02.04
STM32CubeIDE / HAL register callbacks  (0) 2021.02.03
Posted by 구차니
embeded/Cortex-M3 STM2021. 7. 2. 11:07

AVR의 fuse bit 같은 녀석

 

Level 0: no read protection
Level 1: read protection enabled
Level 2: debug/chip read protection disabled

[링크 : https://www.st.com/resource/en/reference_manual/DM00031020-.pdf]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 wdg 최대 설정시간  (0) 2021.08.09
stm32 RST pull-up reset fail  (0) 2021.08.02
stm32 uart echo  (0) 2021.02.04
STM32CubeIDE / HAL register callbacks  (0) 2021.02.03
STM32CubeIDE 주의사항(?)  (0) 2021.02.02
Posted by 구차니
embeded/Cortex-M3 STM2021. 2. 4. 13:43

해당예제를 조금 더 수정하면

UART1 에서 UART2로 서로 연결할 수 있겠네?

[링크 : https://riptutorial.com/stm32/example/29940/echo-application---hal-library]

 

 

UART1은 115200 UART2는 9600인데 크게 문제 없이 잘 되는 듯?

char byte;
char byte3;
void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
{
  if (huart->Instance == USART1)
  {
    /* Transmit one byte with 100 ms timeout */
    HAL_UART_Transmit(&huart3, &byte, 1, 100);

    /* Receive one byte in interrupt mode */
    HAL_UART_Receive_IT(&huart1, &byte, 1);
  }

  if (huart->Instance == USART3)
  {
    /* Transmit one byte with 100 ms timeout */
    HAL_UART_Transmit(&huart1, &byte3, 1, 100);

    /* Receive one byte in interrupt mode */
    HAL_UART_Receive_IT(&huart3, &byte3, 1);
  }
}


int main(void)
{
  HAL_UART_Receive_IT(&huart1, &byte, 1);
  HAL_UART_Receive_IT(&huart3, &byte3, 1);

  while (1)
  {

  }
}

 

 

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 RST pull-up reset fail  (0) 2021.08.02
STM32 RDP(ReaD Protection)  (0) 2021.07.02
STM32CubeIDE / HAL register callbacks  (0) 2021.02.03
STM32CubeIDE 주의사항(?)  (0) 2021.02.02
STM32F103 관련 용어  (0) 2021.02.02
Posted by 구차니
embeded/Cortex-M3 STM2021. 2. 3. 16:06

STM32CubeIDE의 경우 ioc 파일을 수정하면 코드를 재성성하는데

소스내의 헤더들도 당연히(?) 재생성 되니 계속 원복 되어서 분노 폭발(!)

 

열심히 뒤적여 보니 uart callback 관련해서는

stm32f1xx_hal_conf.h 의 아래 부분 설정은

/* ########################### System Configuration ######################### */
/**
  * @brief This is the HAL system configuration section
  */
#define  VDD_VALUE                    3300U /*!< Value of VDD in mv */
#define  TICK_INT_PRIORITY            0U    /*!< tick interrupt priority (lowest by default)  */
#define  USE_RTOS                     0U
#define  PREFETCH_ENABLE              1U

#define  USE_HAL_ADC_REGISTER_CALLBACKS         0U /* ADC register callback disabled       */
#define  USE_HAL_CAN_REGISTER_CALLBACKS         0U /* CAN register callback disabled       */
#define  USE_HAL_CEC_REGISTER_CALLBACKS         0U /* CEC register callback disabled       */
#define  USE_HAL_DAC_REGISTER_CALLBACKS         0U /* DAC register callback disabled       */
#define  USE_HAL_ETH_REGISTER_CALLBACKS         0U /* ETH register callback disabled       */
#define  USE_HAL_HCD_REGISTER_CALLBACKS         0U /* HCD register callback disabled       */
#define  USE_HAL_I2C_REGISTER_CALLBACKS         0U /* I2C register callback disabled       */
#define  USE_HAL_I2S_REGISTER_CALLBACKS         0U /* I2S register callback disabled       */
#define  USE_HAL_MMC_REGISTER_CALLBACKS         0U /* MMC register callback disabled       */
#define  USE_HAL_NAND_REGISTER_CALLBACKS        0U /* NAND register callback disabled      */
#define  USE_HAL_NOR_REGISTER_CALLBACKS         0U /* NOR register callback disabled       */
#define  USE_HAL_PCCARD_REGISTER_CALLBACKS      0U /* PCCARD register callback disabled    */
#define  USE_HAL_PCD_REGISTER_CALLBACKS         0U /* PCD register callback disabled       */
#define  USE_HAL_RTC_REGISTER_CALLBACKS         0U /* RTC register callback disabled       */
#define  USE_HAL_SD_REGISTER_CALLBACKS          0U /* SD register callback disabled        */
#define  USE_HAL_SMARTCARD_REGISTER_CALLBACKS   0U /* SMARTCARD register callback disabled */
#define  USE_HAL_IRDA_REGISTER_CALLBACKS        0U /* IRDA register callback disabled      */
#define  USE_HAL_SRAM_REGISTER_CALLBACKS        0U /* SRAM register callback disabled      */
#define  USE_HAL_SPI_REGISTER_CALLBACKS         0U /* SPI register callback disabled       */
#define  USE_HAL_TIM_REGISTER_CALLBACKS         0U /* TIM register callback disabled       */
#define  USE_HAL_UART_REGISTER_CALLBACKS        1U /* UART register callback enabled      */
#define  USE_HAL_USART_REGISTER_CALLBACKS       0U /* USART register callback disabled     */
#define  USE_HAL_WWDG_REGISTER_CALLBACKS        0U /* WWDG register callback disabled      */

 

STM32CubeIDE의 ioc / Project Manager - Advanced Settings - Register Callbacks

(오른쪽 구석탱이...)을 Enable로 바꾸어 주면 된다.

 

연관이 있는 링크인진 모르겠음 ㅋㅋ

[링크 : https://www.st.com/.../dm00154093-description-of-stm32f1-hal-and-lowlayer-drivers-stmicroelectronics.pdf]

 

 

+

나도 어느걸 보다가 저걸 발견했는진 모르겠다 -_-

소스 뒤적여서 추적하다가 발견한건가..

 

[링크 : https://mul-ku.tistory.com/entry/STM32-UART-수신-인터럽트-사용법-및-간단한-예제HAL-DRIVER]

[링크 : https://community.st.com/s/question/0D53W000000bRmkSAE/stm32-uart-call-back-function]

[링크 : https://dkeemin.com/stm32f0-uart-수신-인터럽트-코드-작성하기/]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32 RDP(ReaD Protection)  (0) 2021.07.02
stm32 uart echo  (0) 2021.02.04
STM32CubeIDE 주의사항(?)  (0) 2021.02.02
STM32F103 관련 용어  (0) 2021.02.02
CMSIS for stm32  (0) 2018.02.12
Posted by 구차니
embeded/Cortex-M3 STM2021. 2. 2. 18:25

ioc 파일을 통해 코드를 생성하는데

아래의 구역에 있는 애들은 새롭게 생성되어도 날아가지 않지만

그 외의 구역에는 전부 날아가니 주의!

 

/* USER CODE BEGIN 4 */

/* USER CODE END 4 */

'embeded > Cortex-M3 STM' 카테고리의 다른 글

stm32 uart echo  (0) 2021.02.04
STM32CubeIDE / HAL register callbacks  (0) 2021.02.03
STM32F103 관련 용어  (0) 2021.02.02
CMSIS for stm32  (0) 2018.02.12
stm32 DMA 관련글들  (0) 2017.12.11
Posted by 구차니
embeded/Cortex-M3 STM2021. 2. 2. 15:31

IWDG - Independent Watchdog

Note: The RTC, the IWDG, and the corresponding clock sources are not stopped by entering Stop or Standby mode.

 

 

클럭관련

High/Low speed External/Internal

HSE = high-speed external clock signal

HSI = high-speed internal clock signal

LSI = low-speed internal clock signal

LSE = low-speed external clock signal

 

APB1은 36MHz 클럭 최대, APB2는 72MHz 최대

다만 타이머쪽은 둘다 72MHz를 넣을 수 있다.

 

USART 번호가 없어서 모르겠지만 4.5Mbit/s 혹은 2.25Mbit/s 까지 설정이 가능하다는데

아니 USART를 Mbps 급으로 쓰는데가 있긴 한건가? ㄷㄷ

 

아 맞다.. 있긴 있었지.. -_-

2021/01/08 - [embeded] - orange pi r1+

 

 

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32CubeIDE / HAL register callbacks  (0) 2021.02.03
STM32CubeIDE 주의사항(?)  (0) 2021.02.02
CMSIS for stm32  (0) 2018.02.12
stm32 DMA 관련글들  (0) 2017.12.11
cmsis printf  (0) 2017.01.10
Posted by 구차니
embeded/Cortex-M3 STM2018. 2. 12. 13:25

음.. lm3s stellaris를 위한건 없나?

일단 STM32 로는 꽤 많은 자료가 나온다.

[링크 : https://www.doulos.com/knowhow/arm/CMSIS/CMSIS_Doulos_Tutorial.pdf]

    [링크 : https://www.doulos.com/knowhow/arm/CMSIS/index.php]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32CubeIDE 주의사항(?)  (0) 2021.02.02
STM32F103 관련 용어  (0) 2021.02.02
stm32 DMA 관련글들  (0) 2017.12.11
cmsis printf  (0) 2017.01.10
stm32 cortex-m3 api / library  (0) 2015.01.17
Posted by 구차니
embeded/Cortex-M3 STM2017. 12. 11. 17:57

검색하다 보니 같은 블로그네..

아무튼 STM32에 DMA로는 SPI 정도만 가속하는 정도일려나?


[링크 : https://javakys.wordpress.com/.../stm32f2xx-또는-stm32f4xx에서-spi-dma를-통해-full-duplex-통신-구현하기/]

[링크 : https://javakys.wordpress..../nucleo-stm32f401re에서-spi-dma를-이용해서-w5500-송수신-성능-개선하기/]

[링크 : http://blog.naver.com/gauya/220215460198]


+

lm3s1607도 찾아 보았는데.. UART와 SPI에 대해서만 존재하는 걸로 보인다.

[링크 : http://www.ti.com/lit/ds/symlink/lm3s1607.pdf]


+

DMA는 들어봤지만 직접 구현해본적은 없다 보니 찾아 봐야할 듯..

특정 회로 라인에 물리는게 아닌건가..?

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32F103 관련 용어  (0) 2021.02.02
CMSIS for stm32  (0) 2018.02.12
cmsis printf  (0) 2017.01.10
stm32 cortex-m3 api / library  (0) 2015.01.17
stm32f103z ?  (0) 2015.01.10
Posted by 구차니
embeded/Cortex-M3 STM2017. 1. 10. 18:33

CMSIS - Cortex Microcontroller Software Interface Standard


[링크 : http://www.ti.com/lit/an/spma041g/spma041g.pdf]

    [링크 : https://www.arm.com/.../cortex-m/cortex-microcontroller-software-interface-standard.php]

    [링크 : http://www.ti.com/tool/cmsis_device_headers] download


Cortex-m0는 ITM 미지원 

[링크 : https://www.arm.com/files/pdf/AT_-_Advanced_Debug_of_Cortex-M_Systems.pdf]

[링크 : http://blog.atollic.com/cortex-m-debugging-printf-redirection-to-a-debugger-console-using-swv/itm-part-1]


+

lm3s 시리즈에는 DFP(Device Family Pack)로 제공하는데 cmsis가 포함되어있는진 모르겠네

[링크 : https://www.keil.com/dd2/pack/]

'embeded > Cortex-M3 STM' 카테고리의 다른 글

STM32F103 관련 용어  (0) 2021.02.02
CMSIS for stm32  (0) 2018.02.12
stm32 DMA 관련글들  (0) 2017.12.11
stm32 cortex-m3 api / library  (0) 2015.01.17
stm32f103z ?  (0) 2015.01.10
Posted by 구차니