Hi there,
First: Thank you for that outstanding nice OS Giovanni!
I tried to get the Example-Code from http://www.chibios.org/dokuwiki/doku.ph ... overy:code to work.
But I am not able to compile. Error Codes are (amongst others):
main.c:59:19: error: unknown type name 'ADCDriver'
main.c:59:36: error: unknown type name 'adcsample_t'
main.c:71:1: error: unknown type name 'adcsample_t'
main.c:79:1: error: unknown type name 'ADCConversionGroup'
Includeded are:
#include "ch.h"
#include "hal.h"
#include "shell.h"
#include "chprintf.h"
#include <ff.h>
#include <string.h>
#include "mad.h"
I am pretty sure that this is some header or configuration problem, but can't find the solution. How do I proceed to find the solution to the problem? Thanks very much for any assist beforehand!
ADC on STM32F4Discovery
Moderators: RoccoMarco, lbednarz, tfAteba
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: ADC on STM32F4Discovery
It was not
, thank you!
It is much better, but still not working:
#error "STM32_ADCCLK outside acceptable range (STM32_ADCCLK_MIN...STM32_ADCCLK_MAX)"
Do I have to set the frequency somewhere?
Thanks again for your help!
It is much better, but still not working:
#error "STM32_ADCCLK outside acceptable range (STM32_ADCCLK_MIN...STM32_ADCCLK_MAX)"
Do I have to set the frequency somewhere?
Thanks again for your help!
- Giovanni
- Site Admin
- Posts: 14895
- Joined: Wed May 27, 2009 8:48 am
- Has thanked: 1202 times
- Been thanked: 997 times
Re: ADC on STM32F4Discovery
Hi,
It is quite complex, the frequency is calculated from all the clock settings in mcuconf.h, it is strange because the defaults should be OK.
Make sure to take the file mcuconf.h from a project using the ADC for your same MCU, try ./testhal/STM32F4xx/ADC.
Giovanni
It is quite complex, the frequency is calculated from all the clock settings in mcuconf.h, it is strange because the defaults should be OK.
Make sure to take the file mcuconf.h from a project using the ADC for your same MCU, try ./testhal/STM32F4xx/ADC.
Giovanni
Re: ADC on STM32F4Discovery
Hello Giovanni,
Thanks for your very fast reply. Again you were spot on:
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
was ADC_CCR_ADCPRE_DIV2 instead of ADC_CCR_ADCPRE_DIV4.
It compiles now, I have to test it further..
Thanks for your very fast reply. Again you were spot on:
#define STM32_ADC_ADCPRE ADC_CCR_ADCPRE_DIV4
was ADC_CCR_ADCPRE_DIV2 instead of ADC_CCR_ADCPRE_DIV4.
It compiles now, I have to test it further..