embeded/Cortex-M7 STM2024. 9. 6. 12:43

NRST랑 머가 다른가 해서 찾아봤더니

NJTRST 는 JTAG 부분만 리셋을 한다고

[링크 : https://community.st.com/t5/stm32-mcus-products/jtrst-and-nrst-of-stm32-mcu/td-p/627177]

 

왼쪽은 JTAG, 오른쪽은 SWD

RESET은 MCU 전체 리셋이고 JTAG 에만 nTRST가 존재한다.

 

[링크 : https://www.segger.com/products/debug-probes/j-link/technology/interface-description/]

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

FDE CIE  (0) 2024.09.06
code alignement factor?  (0) 2024.09.06
STM32H757 전원 설정  (0) 2024.09.04
STM32 / no MCU device found  (0) 2024.09.04
STM32CubeIDE alt func  (0) 2024.09.03
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 4. 21:56

아니 무슨.. STM32F 시리즈에서는 이런거 본적도 없는데, 전원 옵션이 존재해?

입력이야 PCB 설계쪽에서 할일이긴 한데

 

cubeide 에서 보다보니 RCC에서 power parameters

PW_LDO_SUPPLY 등이 존재하길래 왜(?) 이런거 까지 sw에서 설정해야 하는게 멘붕중

 

 

[링크 : https://www.st.com/resource/en/application_note/an5307-getting-started-with-stm32h7a37b3-line-and-stm32h7b0-value-line-microcontroller-hardware-development-stmicroelectronics.pdf]

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

code alignement factor?  (0) 2024.09.06
DEBUG_JTRST  (0) 2024.09.06
STM32 / no MCU device found  (0) 2024.09.04
STM32CubeIDE alt func  (0) 2024.09.03
stm32h757i-eval 데모 펌웨어 굽기  (0) 2024.08.07
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 4. 15:04

STM32에 프로그램 작성을 위해

CubeIDE 에서 DEBUG를 넣지 않으면 디버깅, 프로그래밍 잘 하다가 어느순간

"no MCU device found" 에러가 발생하며 CPU가 먹통이 되는 경우가 갑자기 발생

 

AVR 인공호흡(?) 처럼 검색해보니

boot0 핀을 이용해서 다른 번지로 부팅을 하게 하면, JTAG이나 SWD이 사용하지 않도록 설정된 프로그램이 실행되지 않아

정상적으로 JTAG/SWD로 접근할 수 있게 된다.

[링크 : https://progdev.tistory.com/16]

 

PB3(SWO)가 영향을 주는 편이라고

[링크 : https://blog.naver.com/crucian2k3/221533654464]

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

DEBUG_JTRST  (0) 2024.09.06
STM32H757 전원 설정  (0) 2024.09.04
STM32CubeIDE alt func  (0) 2024.09.03
stm32h757i-eval 데모 펌웨어 굽기  (0) 2024.08.07
stm32cubeide 빌드할 소스 추가하기  (0) 2024.08.01
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 3. 19:46

cubeIDE 에서 설정할 때 기본으로 잡혀있는 핀이 있는데

그게 아닌 다른 것을 설정하려면 alternative function 으로 지정해서 pin mux 설정이 되어야 한다.

CubeIDE 에서는 ioc 파일 열어 gui 에서 대충~ 핀 설정해주고 기능 enable 시키면 알아서 매핑되어 생성된다.

[링크 : https://m.blog.naver.com/harkjael/222315747541]

 

해당 alt func는

_AF_ 라는 접두를 붙여서 msp 소스에 구현된다.

  else if(huart->Instance==USART1)
  {
  /* USER CODE BEGIN USART1_MspInit 0 */

  /* USER CODE END USART1_MspInit 0 */
    /* Peripheral clock enable */
    __HAL_RCC_USART1_CLK_ENABLE();

    __HAL_RCC_GPIOB_CLK_ENABLE();
    /**USART1 GPIO Configuration
    PB14     ------> USART1_TX
    PB15     ------> USART1_RX
    */
    GPIO_InitStruct.Pin = GPIO_PIN_14|GPIO_PIN_15;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
    GPIO_InitStruct.Alternate = GPIO_AF4_USART1;
    HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);

  /* USER CODE BEGIN USART1_MspInit 1 */

  /* USER CODE END USART1_MspInit 1 */
  }

...

    GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_5|GPIO_PIN_6;
    GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
    GPIO_InitStruct.Pull = GPIO_NOPULL;
    GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
    GPIO_InitStruct.Alternate = GPIO_AF5_SPI4;
    HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);

 

stm32h7xx_hal_gpio_ex.h

#define GPIO_AF5_SPI1          ((uint8_t)0x05)  /* SPI1 Alternate Function mapping   */
#define GPIO_AF5_SPI2          ((uint8_t)0x05)  /* SPI2 Alternate Function mapping   */
#define GPIO_AF5_SPI3          ((uint8_t)0x05)  /* SPI3 Alternate Function mapping   */
#define GPIO_AF5_SPI4          ((uint8_t)0x05)  /* SPI4 Alternate Function mapping   */
#define GPIO_AF5_SPI5          ((uint8_t)0x05)  /* SPI5 Alternate Function mapping   */
#define GPIO_AF5_SPI6          ((uint8_t)0x05)  /* SPI6 Alternate Function mapping   */
#define GPIO_AF5_CEC           ((uint8_t)0x05)  /* CEC  Alternate Function mapping   */

#define GPIO_AF4_I2C1          ((uint8_t)0x04)  /* I2C1 Alternate Function mapping   */
#define GPIO_AF4_I2C2          ((uint8_t)0x04)  /* I2C2 Alternate Function mapping   */
#define GPIO_AF4_I2C3          ((uint8_t)0x04)  /* I2C3 Alternate Function mapping   */
#define GPIO_AF4_I2C4          ((uint8_t)0x04)  /* I2C4 Alternate Function mapping   */
#if defined(I2C5)
#define GPIO_AF4_I2C5          ((uint8_t)0x04)  /* I2C5 Alternate Function mapping   */
#endif /* I2C5*/
#define GPIO_AF4_TIM15         ((uint8_t)0x04)  /* TIM15 Alternate Function mapping  */
#define GPIO_AF4_CEC           ((uint8_t)0x04)  /* CEC Alternate Function mapping    */
#define GPIO_AF4_LPTIM2        ((uint8_t)0x04)  /* LPTIM2 Alternate Function mapping */
#define GPIO_AF4_USART1        ((uint8_t)0x04)  /* USART1 Alternate Function mapping */
#if defined(USART10)
#define GPIO_AF4_USART10       ((uint8_t)0x04)  /* USART10 Alternate Function mapping : available on STM32H72xxx/STM32H73xxx */
#endif /*USART10*/
#define GPIO_AF4_DFSDM1        ((uint8_t)0x04)  /* DFSDM  Alternate Function mapping */
#if defined(DFSDM2_BASE)
#define GPIO_AF4_DFSDM2        ((uint8_t)0x04)  /* DFSDM2 Alternate Function mapping */
#endif /* DFSDM2_BASE */
#define GPIO_AF4_DCMI          ((uint8_t)0x04)   /* DCMI Alternate Function mapping : available on STM32H7A3xxx/STM32H7B3xxx/STM32H7B0xxx and STM32H72xxx/STM32H73xxx */
#if defined(PSSI)
#define GPIO_AF4_PSSI          ((uint8_t)0x04)  /* PSSI Alternate Function mapping   */
#endif /* PSSI */
#if defined(OCTOSPIM)
#define GPIO_AF4_OCTOSPIM_P1   ((uint8_t)0x04)  /* OCTOSPI Manager Port 1 Alternate Function mapping  : available on STM32H72xxx/STM32H73xxx */
#endif /* OCTOSPIM */


stm32h7xx_hal_msp.c 에서 핀 설정이 변경되는데, 파일 이름의 msp는 mcu 지원 패키지의 약자랜다.

msp - mcu support package

[링크 : https://community.st.com/t5/stm32cubemx-mcus/hal-peripheral-msp-init-why-does-stm32cubeide-generated-code-not/td-p/219207]

 

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

STM32H757 전원 설정  (0) 2024.09.04
STM32 / no MCU device found  (0) 2024.09.04
stm32h757i-eval 데모 펌웨어 굽기  (0) 2024.08.07
stm32cubeide 빌드할 소스 추가하기  (0) 2024.08.01
STM32H75I-EVAL  (0) 2024.08.01
Posted by 구차니
embeded/Cortex-M7 STM2024. 8. 7. 15:21

파일을 올리기 전에

 

EL 이라고 써있는 External Loaders를 선택해서

 

stm32h747로 검색하면 나오는 보드가 있는데 해당 보드를 선택후 플래시를 진행하면 정상적으로 구워진다.

 

플래시를 활성화할수 있는 코드를 external loader에서 실행해주는 것 같고

로더가 먼저 실행된 후 내부 플래시와 외부 NOR flash에 구워지는 것으로 보인다.

757(보안 모듈 있음) 747(보안모듈 없음) 차이므로 보드가 다르다고 하더라도 문제는 없을듯 하다.

 

[링크 : https://community.st.com/t5/stm32-mcus-products/nor-flash-memory-in-stm32h747i-eval-board/td-p/629797]

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

STM32 / no MCU device found  (0) 2024.09.04
STM32CubeIDE alt func  (0) 2024.09.03
stm32cubeide 빌드할 소스 추가하기  (0) 2024.08.01
STM32H75I-EVAL  (0) 2024.08.01
stm32cubeide 펌웨어 업데이트 이후 자동 재시작  (2) 2024.07.25
Posted by 구차니
embeded/Cortex-M7 STM2024. 8. 1. 15:23

core 쪽은 추가하면 바로 빌드되는데

별도의 디렉토리를 추가하고 소스를 넣으면 빌드가 자동으로 안된다.

 

includes 탭은 include 파일/디렉토리를 추가하고

 

Source Location 에는 소스 파일/디렉토리를 추가하면 된다.

[링크 : https://mokhwasomssi.tistory.com/198]

 

드디어 에러가 발생한다아!!!! 만세!!

Posted by 구차니
embeded/Cortex-M7 STM2024. 8. 1. 10:49

한번 새로 프로젝트 만들려고 해보는데

어...라... STM32H7로 검색하니 750까지만 공개(?)되어 있고, 757은 안나온다.

 

그래서 홈페이지 가서 뒤져보니 데모용 바이너리는 존재한다. 이거 소스는 못 받나?

[링크 : https://www.st.com/en/evaluation-tools/stm32h757i-eval.html#tools-software]

Posted by 구차니
embeded/Cortex-M7 STM2024. 7. 25. 13:51

자동 재시작이 안되서 이상하다 싶어 보는데

Reset behavior에 "Connect under reset"이 되어있으면 펌웨어 업데이트 이후 리셋을 눌러줘야 재기동하고

"Software system reset"을 하면 펌웨어 업데이트 이후 자동으로 재시작 된다.

 

Halt all cores가 체크 가능한건 두 개 뿐이네..

Posted by 구차니
embeded/Cortex-M7 STM2024. 7. 24. 16:18

아무생각없이 무지성으로 clean 하면 매번 빌드되서 짜증났는데

proejct 쪽 메뉴에서 preference 봐도 없길래

clean 메뉴를 다시 보니 가장 아래에

"Start a build immediately"에 체크가 되어있다.

아니.. clean 한다고 왜 빌드 바로 하라는 옵션이 있냐구요.. -_-

 

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

STM32H75I-EVAL  (0) 2024.08.01
stm32cubeide 펌웨어 업데이트 이후 자동 재시작  (2) 2024.07.25
우분투에서 stm32cubeide 삭제  (0) 2024.07.24
STM32H7 디버깅 설정(cubeIDE)  (0) 2024.07.22
STM32H750 operation mode  (0) 2024.07.22
Posted by 구차니
embeded/Cortex-M7 STM2024. 7. 24. 16:10

버전을 넣어서 삭제하면 끝

$ sudo apt purge segger-jlink-udev-rules st-stlink-server st-stlink-udev-rules st-stm32cubeide-1.5.0

[링크 : https://askubuntu.com/questions/1444347/uninstall-stm32cubeide]

Posted by 구차니