조회 수 5400 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄 첨부

라즈베리파이2에서 RTOS기반으로 간단한 GPIO제어(LED)를 해보았다.

 

라즈베리파이의 데이터 시트는 아래의 링크를 통해 방문하면 다운로드 받을 수 있으나 더 이상 업데이트가 안 되는듯하다.

https://www.raspberrypi.org/documentation/hardware/raspberrypi/

 

데이터 시트에는 물리 주소의 시작이 0x20000000 로 나와있으나 라즈베리파이2 는 BCM2836 SOC를 사용하고 있고 물리 주소는 0x3F000000 부터 시작한다. GPIO는 여기에 0x200000 를 더한 위치부터 시작한다.

 

어쨋든 LED를 제어해 보기위해 LED를 연결해야하는데 아래 이미지를 참고하여 GPIO12에 연결하기로함.

raspberrypi2_gpio.png

아래의 이미지는 데이터 시트에서 GPIO의 기능을 설정하는 레지스터를 설명하는 일부분을 가져온것이다. LED를 제어하려면 Output으로 설정해야한다.

GPIO Function Select Registers.png

이후에는 GPIO12를 제어하기 위해 GPIO Output Set Register 0 또는 GPIO Output Clear Register 0 레지스터에서 해당 비트를 설정함으로써 LED를 ON, OFF할 수 있다.

GPIO Output Set Register 0.png

 

GPIO Output Clear Register 0.png

 


  1. 임베디드 리눅스 시스템에서 Flutter와 Wayland의 조합

    Date2025.08.21 Category그래픽스 Bymakersweb Views3287
    Read More
  2. OpenAMP 간단한 소개

    Date2024.09.21 Category통신 Bymakersweb Views3584
    Read More
  3. No Image

    Rockchip VOP

    Date2024.04.22 Category드라이버 Bymakersweb Views3534
    Read More
  4. No Image

    Raspberry Pi에서 I²C 그리고 Bit-bang (비트뱅)

    Date2023.08.27 Category통신 Bymakersweb Views4414
    Read More
  5. No Image

    Yocto 프로젝트 3.4 릴리스(honister) 이상 버전으로 마이그레이션 시 참고 사항

    Date2023.03.21 Category개발환경 Bymakersweb Views4640
    Read More
  6. Raspberry Pi 와 ATtiny85 간 I²C 통신

    Date2023.03.18 Category통신 Bymakersweb Views4265
    Read More
  7. 로직분석기와 함께 PulseView 를 사용해서 CAN 신호 캡쳐

    Date2023.03.16 Category통신 Bymakersweb Views3971
    Read More
  8. 임베디드 개발자를 위한 Hex,Bin,Dec 변환기 유틸

    Date2023.02.27 Category개발환경 Bymakersweb Views6235
    Read More
  9. ATtiny85 개발보드(HW-260)

    Date2023.01.02 Category개발환경 Bymakersweb Views4155
    Read More
  10. No Image

    플랫폼 디바이스 및 디바이스 트리

    Date2021.03.20 Category드라이버 Bymakersweb Views6512
    Read More
  11. Android 기기를 사용하여 Raspberry Pi SD 카드 작성 방법

    Date2020.08.01 CategorySBC Bymakersweb Views4864
    Read More
  12. No Image

    Raspberry Pi 의 프레임버퍼(Framebuffer)구성

    Date2020.05.15 CategorySBC Bymakersweb Views6284
    Read More
  13. 라즈베리파이2에서 RTOS기반 GPIO제어(LED)

    Date2020.04.21 CategorySBC Bymakersweb Views5400
    Read More
  14. POSIX를 지원하는 오픈소스 RTOS, RTEMS

    Date2020.04.15 Category운영체제 Bymakersweb Views5335
    Read More
  15. No Image

    라즈베리파이 부팅 가능한 sd카드 파티션 생성

    Date2020.04.15 Category운영체제 Bymakersweb Views5356
    Read More
  16. No Image

    플랫폼 디바이스 및 드라이버에 대해서

    Date2020.02.01 Category드라이버 Bymakersweb Views11711
    Read More
  17. No Image

    디바이스 트리(Device Tree, DT)

    Date2020.01.12 Category운영체제 Bymakersweb Views9829
    Read More
  18. RISC-V : 자유롭고 개방 된 RISC 명령어 세트 아키텍처

    Date2020.01.01 CategoryMCU Bymakersweb Views4584
    Read More
  19. 임베디드 비대칭 멀티 프로세싱(asymmetric multiprocessing) 시스템

    Date2019.12.31 Category운영체제 Bymakersweb Views4599
    Read More
  20. No Image

    임베디드 시스템에서 베어메탈(Bare metal) 이란?

    Date2019.12.11 Category펌웨어 Bymakersweb Views8499
    Read More
Board Pagination Prev 1 2 3 Next
/ 3