-
[STM32F] ADC with DMA카테고리 없음 2020. 9. 11. 15:59
*Mhive 님의 강의를 기반으로 정리하였습니다.
Direct Memory Access
: 코드를 작성할 필요없이 자동으로 메모리에 데이터가 복사되는 기능.
DMA가 있음으로 엄청 편하구먼
기존에는 채널별로 결과저장 따로 일일이 해줘야 되고 그만큼 clk도 사용하겠지?
Peripheral to Memory 방식이라는 것 !
(자세한 개념은 추후 정리하기로)
-DMA는 CPU 클럭을 사용하지 않기때문에, CPU효율을 높일 수 있다.
자. 그러면
ADC with DMA를 이용해서 실습을 해보자.
CubeMX에서
ADC활성화
ADC setting
1. 몇개의 채널을 사용하며
2.
3.
4.
-cpu clk을 어케 사용할거냐
* sampling time : 84 cycle 로 .
*기타 설정 더 많음.
결론 / 정리
- ADC개념을 이해
- 내가 쓰려고 하는 ADC 채널 수는 ?
- DMA를 사용 할 것인지?
- ADC with DMA 설정 in CubeMX
- 생략
- CubeIDE에서 구현
- 알맞는 함수를 찾아야겠지?
- HAL_ADC_Start_DMA( 채널주소, 변환결과 저장하고자하는 배열, 몇개)
STM32F ADC 참고자료
STM32F 책 있네
정말 정리가 잘되있는 블로그
감사합니당. : )
공식가이드
www.st.com/content/dam/kms/Contents/Reflibrary/ADC_Firmware_guide_Mode_and_Feature.pdf
- ADC개념을 이해