하드웨어/lora lorawan2026. 2. 27. 18:30

preamble은 빼고 payload + crc 까진 받아볼 수 있다곤 하는데 정작해보니 잘 안된다.

노이즈만 잔뜩.. 멀 빼먹은걸까?

1. Payload CRC 포함 수신 (가장 일반적)
레지스터 설정으로 CRC를 수신 데이터에 포함시킬 수 있습니다.
c// RegModemConfig2 (0x1E) - RxPayloadCrcOn bit 설정
// bit[2] = 1: CRC 활성화
uint8_t config2 = readReg(REG_MODEM_CONFIG_2);
config2 |= (1 << 2);  // RxPayloadCrcOn = 1
writeReg(REG_MODEM_CONFIG_2, config2);
수신 후 CRC 에러 여부 확인:
c// RegIrqFlags (0x12)
// bit[5] = PayloadCrcError
uint8_t irqFlags = readReg(REG_IRQ_FLAGS);
if (irqFlags & (1 << 5)) {
    // CRC 에러
}

2. Implicit Header Mode (헤더 없이 raw payload)
c// RegModemConfig1 (0x1D)
// bit[0] = ImplicitHeaderModeOn
uint8_t config1 = readReg(REG_MODEM_CONFIG_1);
config1 |= 0x01;  // Implicit Header Mode
writeReg(REG_MODEM_CONFIG_1, config1);
Implicit Header Mode에서는:

헤더(Length, CR, CRC 정보)가 전송되지 않음
송수신 양측이 동일한 파라미터를 사전에 알고 있어야 함
FIFO에서 고정 길이의 raw 데이터를 읽음

 

'하드웨어 > lora lorawan' 카테고리의 다른 글

lora driver for stm32 written in c  (0) 2026.02.26
sx1276 spi 통신  (0) 2026.02.19
LoRa modulation basics  (0) 2025.12.16
lora CR(coding rate)  (0) 2025.12.16
lora evk  (0) 2025.10.02
Posted by 구차니
하드웨어/lora lorawan2026. 2. 26. 10:08

매번 찾아도 안나오더니 오늘 검색하니 똭. -_-

구글아 날 괴롭히는거지?

 

아무튼 c로 작성된 녀석인데.. dio 인터럽트는 사용하지 않고

레지스터 읽어서 (0x12 IRQ flag) 처리하는 쪽으로 구성이 된 듯.

 

RECEIVE packet routines
uint8_t  lora_is_packet_available(lora_sx1276 *lora) Checks if packet modem has packet awaiting to be received Returns 0 if no packet is available, or any positive integer in case packet is ready

uint8_t  lora_pending_packet_length(lora_sx1276 *lora); If modem has packet awaiting to be received - returns it's length.

[링크 : https://github.com/belyalov/stm32-hal-libraries/blob/master/doc/lora.md]

[링크 : https://github.com/belyalov/stm32-hal-libraries/tree/master]

'하드웨어 > lora lorawan' 카테고리의 다른 글

sx1276 raw pakcet  (0) 2026.02.27
sx1276 spi 통신  (0) 2026.02.19
LoRa modulation basics  (0) 2025.12.16
lora CR(coding rate)  (0) 2025.12.16
lora evk  (0) 2025.10.02
Posted by 구차니
embeded/Cortex-M3 STM2026. 2. 25. 16:39

어.. 그냥 얘네는 먼가 하나씩 엇박인 느낌이냐..

CubeIDE 에서 해당 프로젝트를 cpp로 바꾸어도

CubeMX 로 생성되는 파일은 main.c로 나온다. -_-

그냥 알아서(?) 복사해서 넣던가, 아니면 cpp를 c로 바꾸고 generate code 해주던가

영 귀찮네..

 

[링크 : https://community.st.com/t5/stm32cubemx-mcus/generating-c-projects-with-stm32cubemx/td-p/53253]

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

stm32 다른 영역으로 점프(부트로더)  (0) 2026.03.06
mbed + stm32cube hal...?  (0) 2026.02.23
Mbed studio on ubuntu 22.04  (0) 2026.02.23
stm32f103c8t6 cpp std::cout 실패  (0) 2026.02.18
stm32 rtc tamper  (0) 2026.01.29
Posted by 구차니
개소리 왈왈/컴퓨터2026. 2. 24. 23:28

오랫만에 생각난김에 업데이트 시작

어우.. 작년..

 

나온지 20일도 안되는 따끈한 녀석으로 슝

'개소리 왈왈 > 컴퓨터' 카테고리의 다른 글

amd radeon software(아드레날린) 설치  (0) 2026.02.08
dp to usb-c... ?  (0) 2026.02.08
오늘의 줍줍  (0) 2026.01.11
모니터 암 설치 완료  (4) 2026.01.02
체리 키보드 alt-f4가 안되네?  (0) 2026.01.02
Posted by 구차니

agi를 신, 성령, 신성력으로 대체하면 되는건가

기계로 부터의 신.

기계 장치의 신

기계 신

노예로 만들어진 기계로 만들어진 신

 

인간이라는건 참 간사해서 마음에 들면(?) 인간화 시키는데

그럼 이제 ai는 피그말리온 효과를 넘어 인격에서 신으로 나아갈 것인가..

 

'클로드 코드' 개발자 "내부용 실험 도구로 개발...사용 중 AGI 느껴"
임대준 기자업데이트 2026.02.23 18:48  댓글 0

[링크 : https://www.aitimes.com/news/articleView.html?idxno=207095]

 

알트먼 "GPT-4.5 테스트 중 AGI 느꼈다는 평 많아"
임대준 기자업데이트 2025.02.18 21:26  댓글 0

[링크 : https://www.aitimes.com/news/articleView.html?idxno=168094]

'개소리 왈왈 > 인공지능' 카테고리의 다른 글

새로운 마약 - AI  (0) 2026.03.17
gemini 동영상 만들기 (유료?)  (0) 2026.02.22
antigravity 사용량 끝!  (0) 2026.02.20
antigravity 설치  (0) 2026.02.11
gemini cli 에서 gemini 3 flash 사용  (0) 2026.02.11
Posted by 구차니
embeded/Cortex-M3 STM2026. 2. 23. 21:58

[링크 : https://os.mbed.com/forum/mbed/topic/33580/]

[링크 : https://m.blog.naver.com/rlackd93/222449859004]

 

대충 본걸로는 두 개 같이 정상적(?)으로 사용하는건 쉽지않거나 사실상 불가능한 수준?

 

가능 + 방향

일단 mbed 는 cpp 이고

stm32 hal은 c로 되어있는데 cpp 컴파일러에서 extern c를 통해서 c를 끌어올수 있으니

mbed에서 stm32 hal을 끌어올수는 있다 정도?

 

차이점

arm 의 레지스터를 접근해서 설정하도록 구현되어 있어서

mbed hal과 stm32 hal은 코드레벨에서 호환되지 않는다.

서로 관리하는 구조체도 달라서 두개를 무작정 쓰다 보면 충돌나기 쉽고

isr이 관련될 경우 mbed쪽은 다시 덮어 써버리면서 stm32 hal쪽이 정상작동하지 않게 될 가능성이 높아 보인다.

 

추가로 라이브러리 레벨에서는.. mbed가 cpp를 써서 그런가

isr을 런타임중에 교체 가능하도록 구성되어 있어서 이걸 stm32 hal로 구현하려면 어우..

함수 포인터로 비슷하게 할순 있겠지만 아무튼.. 제법 깊게 짱박혀 있어서 구현해보려면 좀 더 깊숙히 봐야할 것 같다.

mbed 예제보다가 가장 신기했던 타이머 이벤트 추가하는 Timeout 클래스

#include "mbed.h"
Timeout response;
DigitalIn button (p14);
DigitalOut led1(LED1);
DigitalOut led2(LED2);
DigitalOut led3(LED3);

void blink() {
  led2 = 1;
  wait(0.5);
  led2 = 0;
}

int main() {
  while(true) {
    if(button == 1){
      response.attach(&blink, 3.0);
      led3=1;
    } else {
      led3=0;
    }
    led1=!led1;     
    wait(0.2);
  }
}

[링크 : https://os.mbed.com/teams/TVZ-Mechatronics-Team/wiki/Timers-interrupts-and-tasks]

 

[링크 : https://os.mbed.com/docs/mbed-os/v6.16/apis/timeout.html]

 

 

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

stm32 다른 영역으로 점프(부트로더)  (0) 2026.03.06
stm32cubeide cpp 변환이후 generate code  (0) 2026.02.25
Mbed studio on ubuntu 22.04  (0) 2026.02.23
stm32f103c8t6 cpp std::cout 실패  (0) 2026.02.18
stm32 rtc tamper  (0) 2026.01.29
Posted by 구차니
embeded/Cortex-M3 STM2026. 2. 23. 11:00

fuse 3.x가 아니라 fuse 2.x를 요구하는 듯.

~/.local/bin$ ./mbed-studio
dlopen(): error loading libfuse.so.2

AppImages require FUSE to run. 
You might still be able to extract the contents of this AppImage 
if you run it with the --appimage-extract option. 
See https://github.com/AppImage/AppImageKit/wiki/FUSE 
for more information

 

부랴부랴 깔고

$ sudo apt-get install libfuse2
패키지 목록을 읽는 중입니다... 완료
의존성 트리를 만드는 중입니다... 완료
상태 정보를 읽는 중입니다... 완료        
다음 새 패키지를 설치할 것입니다:
  libfuse2
0개 업그레이드, 1개 새로 설치, 0개 제거 및 4개 업그레이드 안 함.
90.3 k바이트 아카이브를 받아야 합니다.
이 작업 후 330 k바이트의 디스크 공간을 더 사용하게 됩니다.
받기:1 http://kr.archive.ubuntu.com/ubuntu jammy/universe amd64 libfuse2 amd64 2.9.9-5ubuntu3 [90.3 kB]
내려받기 90.3 k바이트, 소요시간 0초 (290 k바이트/초)
Selecting previously unselected package libfuse2:amd64.
(데이터베이스 읽는중 ...현재 468242개의 파일과 디렉터리가 설치되어 있습니다.)
Preparing to unpack .../libfuse2_2.9.9-5ubuntu3_amd64.deb ...
Unpacking libfuse2:amd64 (2.9.9-5ubuntu3) ...
libfuse2:amd64 (2.9.9-5ubuntu3) 설정하는 중입니다 ...
Processing triggers for libc-bin (2.35-0ubuntu3.13) ...

 

콘솔에서 하던 메뉴에서 하던 아무튼 잘 실행된다.

~/.local/bin$ ./mbed-studio
[2026-02-23T10:56:45.744] [INFO] MbedStudio - Configuration directory URI: 'file:///home/falinux/.theia' []
[2026-02-23T10:56:45.745] [DEBUG] MbedStudio - Backend Object.initialize took: 5.4 ms []
[2026-02-23T10:56:45.745] [ERROR] MbedStudio - (node:3182744) [DEP0005] DeprecationWarning: Buffer() is deprecated due to security and usability issues. Please use the Buffer.alloc(), Buffer.allocUnsafe(), or Buffer.from() methods instead. []
[2026-02-23T10:56:45.745] [DEBUG] MbedStudio - Backend ElectronTokenBackendContribution.configure took: 3.9 ms []
[2026-02-23T10:56:45.745] [DEBUG] MbedStudio - Backend ElectronMessagingContribution.onStart took: 1.3 ms []
[2026-02-23T10:56:45.746] [DEBUG] MbedStudio - Backend MbedEnvContribution.initialize took: 0.7 ms []
[2026-02-23T10:56:45.746] [DEBUG] MbedStudio - Backend FileDownloadEndpoint.configure took: 0.5 ms []
[2026-02-23T10:56:45.746] [DEBUG] MbedStudio - Backend TaskBackendApplicationContribution.onStart took: 0.2 ms []
[2026-02-23T10:56:45.746] [DEBUG] MbedStudio - Starting the deployer with the list of resolvers [
  [
    LocalDirectoryPluginDeployerResolver {},
    GithubPluginDeployerResolver {
      unpackedFolder: '/tmp/github-remote'
    },
    HttpPluginDeployerResolver { unpackedFolder: '/tmp/http-remote' }
  ]
]
[2026-02-23T10:56:45.747] [DEBUG] MbedStudio - STUDIO_ACTIVITY_URL variable not set. Activity monitoring is disabled. []
[2026-02-23T10:56:45.748] [DEBUG] MbedStudio - Backend PluginDeployerContribution.initialize took: 0.8 ms []
[2026-02-23T10:56:45.748] [DEBUG] MbedStudio - Backend AuthenticationServerImpl.configure took: 0.4 ms []
[2026-02-23T10:56:45.748] [DEBUG] MbedStudio - Backend ActivityServiceImpl.onStart took: 0.1 ms []
[2026-02-23T10:56:45.748] [INFO] MbedStudio - Configuring to accept webviews on '.+.webview..+' hostname. []
[2026-02-23T10:56:45.748] [INFO] root/mbs-device - Starting USB detection []
[2026-02-23T10:56:45.748] [DEBUG] MbedStudio - Found the list of default plugins ID on env: [ undefined ]
[2026-02-23T10:56:45.748] [DEBUG] MbedStudio - Found the list of plugins ID on env: [ undefined ]
[2026-02-23T10:56:45.748] [DEBUG] MbedStudio - Found the list of default plugins ID from CLI: [ undefined ]
[2026-02-23T10:56:45.749] [DEBUG] MbedStudio - Backend PluginApiContribution.configure took: 1.2 ms []
[2026-02-23T10:56:45.749] [DEBUG] MbedStudio - Backend DeviceManager.onStart took: 0.8 ms []
[2026-02-23T10:56:45.751] [DEBUG] MbedStudio - Backend HostedPluginReader.configure took: 2.5 ms []
[2026-02-23T10:56:45.751] [DEBUG] MbedStudio - Backend GitDetailsManager.onStart took: 2.7 ms []
[2026-02-23T10:56:45.751] [DEBUG] MbedStudio - Removing all user plugins []
[2026-02-23T10:56:45.751] [DEBUG] MbedStudio - Appending system plugins: local-dir:/home/falinux/mbs-plugins, local-dir:/tmp/.mount_mbed-skHNrFk/resources/app/plugins/electron, local-dir:/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins []
[2026-02-23T10:56:45.751] [WARN] MbedStudio - The directory referenced by local-dir:/home/falinux/mbs-plugins does not exist. []
[2026-02-23T10:56:45.752] [INFO] MbedStudio - Theia app listening on http://localhost:33937. []
[2026-02-23T10:56:45.762] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/plugins/electron/mbs-plugin-electron-mbed'
]
[2026-02-23T10:56:45.763] [DEBUG] MbedStudio - Resolving "mbs-plugin-electron-mbed" as a VS Code extension... []
[2026-02-23T10:56:45.767] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins/vscode-builtin-cpp'
]
[2026-02-23T10:56:45.767] [DEBUG] MbedStudio - Resolving "vscode-builtin-cpp" as a VS Code extension... []
[2026-02-23T10:56:45.767] [INFO] MbedStudio - Resolved "vscode-builtin-cpp" to a VS Code extension "cpp@1.44.2" with engines: [ { vscode: '*' } ]
[2026-02-23T10:56:45.768] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins/vscode-builtin-json'
]
[2026-02-23T10:56:45.768] [DEBUG] MbedStudio - Resolving "vscode-builtin-json" as a VS Code extension... []
[2026-02-23T10:56:45.768] [INFO] MbedStudio - Resolved "vscode-builtin-json" to a VS Code extension "json@1.44.2" with engines: [ { vscode: '0.10.x' } ]
[2026-02-23T10:56:45.768] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins/vscode-builtin-python'
]
[2026-02-23T10:56:45.768] [DEBUG] MbedStudio - Resolving "vscode-builtin-python" as a VS Code extension... []
[2026-02-23T10:56:45.768] [INFO] MbedStudio - Resolved "vscode-builtin-python" to a VS Code extension "python@1.44.2" with engines: [ { vscode: '*' } ]
[2026-02-23T10:56:45.768] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins/vscode-builtin-shellscript'
]
[2026-02-23T10:56:45.768] [DEBUG] MbedStudio - Resolving "vscode-builtin-shellscript" as a VS Code extension... []
[2026-02-23T10:56:45.768] [INFO] MbedStudio - Resolved "vscode-builtin-shellscript" to a VS Code extension "shellscript@1.44.2" with engines: [ { vscode: '*' } ]
[2026-02-23T10:56:45.769] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins/vscode-builtin-xml'
]
[2026-02-23T10:56:45.769] [DEBUG] MbedStudio - Resolving "vscode-builtin-xml" as a VS Code extension... []
[2026-02-23T10:56:45.769] [INFO] MbedStudio - Resolved "vscode-builtin-xml" to a VS Code extension "xml@1.44.2" with engines: [ { vscode: '*' } ]
[2026-02-23T10:56:45.769] [INFO] MbedStudio - PluginTheiaDirectoryHandler: accepting plugin with path [
  '/tmp/.mount_mbed-skHNrFk/resources/app/theia-plugins/vscode-builtin-yaml'
]
[2026-02-23T10:56:45.769] [DEBUG] MbedStudio - Resolving "vscode-builtin-yaml" as a VS Code extension... []
[2026-02-23T10:56:45.769] [INFO] MbedStudio - Resolved "vscode-builtin-yaml" to a VS Code extension "yaml@1.44.2" with engines: [ { vscode: '*' } ]
[2026-02-23T10:56:45.774] [DEBUG] MbedStudio - the accepted plugins are [ [] ]
[2026-02-23T10:56:45.775] [DEBUG] MbedStudio - the acceptedFrontendPlugins plugins are [ [] ]

 

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

stm32cubeide cpp 변환이후 generate code  (0) 2026.02.25
mbed + stm32cube hal...?  (0) 2026.02.23
stm32f103c8t6 cpp std::cout 실패  (0) 2026.02.18
stm32 rtc tamper  (0) 2026.01.29
stm32f103 rtc backup register  (0) 2026.01.29
Posted by 구차니

무료 로그인시

 

 

회사 계정 로그인시(google workspace)

 

심심해서 이미지 생성 하고 그걸 다운로드 받은후 새 채팅으로 동영상 생성을 시작해서 해보는데

음.. 하루 3개?

'개소리 왈왈 > 인공지능' 카테고리의 다른 글

새로운 마약 - AI  (0) 2026.03.17
agi를 느꼈다?  (0) 2026.02.24
antigravity 사용량 끝!  (0) 2026.02.20
antigravity 설치  (0) 2026.02.11
gemini cli 에서 gemini 3 flash 사용  (0) 2026.02.11
Posted by 구차니
파일방2026. 2. 22. 22:30

stm32 에서 usb 장치 만들때 디버깅용으로 좋다고 추천 받음

 

[링크 : https://www.uwe-sieber.de/usbtreeview_e.html]

[링크 : https://blog.naver.com/kim1417/223265256721]

'파일방' 카테고리의 다른 글

exaone 경량 모델  (0) 2026.02.04
podman  (0) 2026.01.25
elinks  (0) 2026.01.20
platformio  (0) 2026.01.17
directFB2  (0) 2026.01.09
Posted by 구차니

아내가 아내친구와 다른 동네서 술 마신다고 데려다 주고 오는데

아내 친구의 친척이 얼마 벌었다 이런 소리하는걸 듣고 있노라니

주식 안하는 내가 문제인가 싶은 생각이 들기도 하는데..

머.. 5천 넘어서 7500 간다 이러고 있긴 하더만.. 모르겠다..

'개소리 왈왈 > 정치관련 신세한탄' 카테고리의 다른 글

혼돈 파괴 카오스(?)의 미국  (0) 2026.01.20
패권주의의 부활?  (0) 2026.01.04
영포티 단상  (0) 2025.11.10
은행 이자는 점점 떨어지네  (0) 2025.09.17
콜래트럴 데미지  (0) 2025.06.03
Posted by 구차니