'embeded'에 해당되는 글 1614건

  1. 2024.11.21 node-red
  2. 2024.11.04 stm32 gpio ext interrupt 모드
  3. 2024.11.04 stm32f103 adc + dma
  4. 2024.10.30 stm32 adc 읽기(1개로 여러 개 채널)
  5. 2024.10.18 1.8인치 TFT LCD with SDcard
  6. 2024.10.11 아두이노 FFB 휠 소스코드
  7. 2024.10.10 modbus rtu coil read
  8. 2024.10.08 stm32 __weak
  9. 2024.10.07 rpi pico usb joystick
  10. 2024.09.26 stm32 modbus
embeded/raspberry pi2024. 11. 21. 10:33

예전에 잠시 지나가면서(?) IoT 관련으로 단말기 만드는데 쓰면 좋겠다 싶었는데

 

UI도 있다고 해서 혹해지는 중

[링크 : https://rasino.tistory.com/358]

[링크 : https://witree.co.kr/layouts/witree_2015/data/product/Manual/Node-RED_basic_use_simple_application.pdf]

 

dashboard 2.0 에서 vuetify를 통해 그래프도 그려줄 수 있는 듯.

[링크 : https://dashboard.flowfuse.com/user/template-examples.html]

Posted by 구차니
embeded/Cortex-M3 STM2024. 11. 4. 22:48

왜 안되나 했더니.. 다른 칩에서 계속 pull down 하고 있어서 버튼을 눌러도 올라가지 않았던...

 

cubeide 에서 특정 핀을 GPIO_EXT로 설정하고

 

External Interrupt Mode with ... 로 시작하는 녀석을 고른다.

필요하다면 falling edge 혹은 rising edge에서만도 잡을 수 있는데

 

둘 다 해두면 어떤 이벤트에서 인터럽트가 발생하는지 모르니, 결국에는 인터럽트 핸들러에서

해당 핀의 상태를 읽어서  판별을 해야하나? 조금 복잡한 문제가 발생할 듯 하다.

[링크 : https://blog.naver.com/micomcore/223281042436?]

 

그리고 NVIC 탭에서 해당 인터럽트를 활성화 해준다.

 

아래의 _weak 함수를 재정의 해서 사용하면 끝

GPIO_Pin은 핀 번호 별로 올라오니, 다른 포트의 같은 핀은 구분이 되지 않으니 유의

void HAL_GPIO_EXTI_Callback(uint16_t GPIO_Pin)
{
  printf("GPIO_Pin[%d]\n", GPIO_Pin);
}

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

STM32 timer 사용하기  (0) 2024.12.13
STM32 PWM 으로 LED 점진적으로 깜박이기  (0) 2024.12.13
stm32f103 adc + dma  (0) 2024.11.04
stm32 adc 읽기(1개로 여러 개 채널)  (0) 2024.10.30
stm32 tim output compare(OC) mode  (0) 2024.07.12
Posted by 구차니
embeded/Cortex-M3 STM2024. 11. 4. 14:12

4개의 아날로그 값을 읽어야 해서 고군분투(?) 했는데 

(설정은 아래대로)

 

+ 2024.11.06

Sampling time이 1.5Cycle로 할 경우 다른 채널이 막 섞이는 것 처럼 보인다.

71.5cycle로 하고(@12MHz) 문제없이 작동 확인

+

 

 

의외로 삽질을 한 부분은... "Continuous Conversion Mode"

이걸 켜고 4개 rank에 대해서 dma로 읽으니

1 2 3 4

2 3 4 1

3 4 1 2

식으로 데이터가 하나씩 (조금은 랜덤하게) 밀리는 현상이 발생한다.

 

Sampling Time은 어느 문서에서는 86cycle 이런식으로 길게 하라는데

혹시나 해서 시스템 클럭을 낮게 했는데도 1.5Cycle에서 큰 문제가 없어 보이니, 장기적으로 테스트 해봐야 알 듯.

 

 

[링크 : https://www.st.com/content/dam/kms/Contents/Reflibrary/ADC_Firmware_guide_Mode_and_Feature.pdf]

[링크 : https://www.st.com/content/dam/kms/Contents/Reflibrary/ADC_Firmware_guide_Timer_and_ADC.pdf]

 

84 cycle

[링크 : https://m.blog.naver.com/kiss103007/223043132332]

[링크 : https://blog.naver.com/nextstone/223369997849]

 

+

STM32F4 시리즈는 F1 과는 또 다른 듯?

[링크 : https://m.blog.naver.com/eziya76/221473392732]

 

[링크 : https://www.st.com/resource/en/application_note/an3116-stm32s-adc-modes-and-their-applications-stmicroelectronics.pdf]

Posted by 구차니
embeded/Cortex-M3 STM2024. 10. 30. 19:35

ADC는 3개인데

읽을 핀은 4개라서 어떻게 해야 하나

 

[링크 : https://m.blog.naver.com/gauya/220232257331]

[링크 : https://github.com/sweesineng/STM32_ADC_MultiCh_SingleConv_Polling?tab=readme-ov-file]

 

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

stm32 gpio ext interrupt 모드  (0) 2024.11.04
stm32f103 adc + dma  (0) 2024.11.04
stm32 tim output compare(OC) mode  (0) 2024.07.12
stm32 reset 없이 JTAG 붙이기  (0) 2023.07.19
STM32H/STM32G 시리즈 시리얼 포트 데이터 order  (0) 2022.08.29
Posted by 구차니
embeded/arduino(genuino)2024. 10. 18. 14:25

부품 보다가 가격이 나쁘진 않은데 먼가 해서 보는데

sd 카드가 있는 녀석과 없는 녀석이 존재한다.

별 이야기는 없지만 color LCD 인것 같고

SDcard에서 파일을 읽어서 LCD로 출력도 된다니까

i2c인지 SDIO인지 나중에 봐야 할 듯.

 

[링크 : https://randomnerdtutorials.com/guide-to-1-8-tft-display-with-arduino/]

'embeded > arduino(genuino)' 카테고리의 다른 글

nRF24L01 복수 장치 통신  (0) 2025.07.29
오랫만에 부품지름  (0) 2025.07.29
아두이노 FFB 휠 소스코드  (0) 2024.10.11
arducam esp8266 https post 예제  (0) 2024.01.31
433MHz RF 통신  (0) 2023.12.07
Posted by 구차니
embeded/arduino(genuino)2024. 10. 11. 11:45

흐음.. 되어있는걸로 하는게 더 편하려나?

[링크 : https://github.com/ranenbg/Arduino-FFB-wheel]

'embeded > arduino(genuino)' 카테고리의 다른 글

오랫만에 부품지름  (0) 2025.07.29
1.8인치 TFT LCD with SDcard  (0) 2024.10.18
arducam esp8266 https post 예제  (0) 2024.01.31
433MHz RF 통신  (0) 2023.12.07
아두이노 dht11  (0) 2022.11.14
Posted by 구차니
embeded/Cortex-M7 STM2024. 10. 10. 12:38

modbus poll 에서 뜬금없이 crc error로 띄워서 헤맸는데

 

03이나 04 명령어 처럼 multiple byte의 경우에는 아래의 형태로 구성되는데

station_id / cmd / length / data(word) / crc 

 

01의 경우는 아래의 형태로 고정된다.

station_id / cmd / length / data(byte) / crc

 

그러다 보니 modbud poll 에서도 고정된 length에서 하드코딩될수 밖에 없고

0x01 0x01 0x02 0x00 0x00 L_CRC M_CRC 로 응답하면

CRC 부분을 보고 읽는게 아니라

0x00 L_CRC 두개를 CRC로 해석하니 mismatch로 잘못 에러를 출력한다.

 

 

어우.. 별거 아닌데 하루를 날리게 하다니..

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

stm32f7 dual bank flash  (0) 2026.02.03
stm32f746g-disco with semtech sx1276 and lvgl  (0) 2026.02.03
stm32 __weak  (0) 2024.10.08
stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
Posted by 구차니
embeded/Cortex-M7 STM2024. 10. 8. 10:27

인터럽트 핸들러의 경우 __WEAK가 앞에 붙어있는데

c 언어라면 동일한 함수명은 사용이 불가능한게 상식인데

새로 정의하면 새로 정의된 함수가 사용되고 기존에 정의된 함수는 사용되지 않는 신기한 녀석이다

그래서 이 기회에서 찾아보는 중

 

cmsis_armcc.h 에서 아래와 같이 정의되어 있다.

#ifndef   __WEAK
  #define __WEAK                                 __attribute__((weak))
#endif

 

링크 시간에 strong symbol은 weak symbol을 override 한다. 라고 되어있는데

컴파일러가 아니라 링커가 연결해주는거라니 신기하다.

__attribute__((weak)) variable attribute
Generates a weak symbol for a variable, rather than the default symbol.

Syntax

__attribute__((weak)) <type> <variable>;
Parameters
None.

Operation
At link time, strong symbols override weak symbols. This attribute replaces a weak symbol with a strong symbol, by choosing a particular combination of object files to link.

Example

__attribute__((weak)) int foo;

[링크 : https://developer.arm.com/documentation/101754/0622/armclang-Reference/Compiler-specific-Function--Variable--and-Type-Attributes/--attribute----weak---variable-attribute]

 

[링크 : https://blog.naver.com/22wowow22/220825653093]

[링크 : https://gangsanilee.tistory.com/2874]

[링크 : https://tigershin-shinhyeonkyu.tistory.com/8]

[링크 : https://engineering-agit.tistory.com/25]

 

 

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

stm32f746g-disco with semtech sx1276 and lvgl  (0) 2026.02.03
modbus rtu coil read  (0) 2024.10.10
stm32 modbus  (0) 2024.09.26
SPI NSS, NSSP mode  (0) 2024.09.11
FDE CIE  (0) 2024.09.06
Posted by 구차니
embeded/rpi pico2024. 10. 7. 19:20

xac가 먼가 했더니 xbox 컨트롤러의 약자인듯.

아무튼 라즈베리 파이 pico 에는 adc가 있으니까 아날로그 입력도 가능할 것 같고

나쁘지 않게 만들수 있을 듯?

 

USB joystick compatible with Xbox Adaptive Controller using Raspberry Pi Pico

[링크 : https://github.com/gdsports/xac_joystick_pipico]

'embeded > rpi pico' 카테고리의 다른 글

rpi pico circuit python 에서 code 실행하기  (0) 2025.08.02
rpi pico sdk  (0) 2025.03.23
rpi pico ADC 범위  (0) 2024.07.16
rpi pico / micropython  (0) 2024.07.15
rpi pico usb sound  (0) 2021.11.08
Posted by 구차니
embeded/Cortex-M7 STM2024. 9. 26. 16:56

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

modbus rtu coil read  (0) 2024.10.10
stm32 __weak  (0) 2024.10.08
SPI NSS, NSSP mode  (0) 2024.09.11
FDE CIE  (0) 2024.09.06
code alignement factor?  (0) 2024.09.06
Posted by 구차니