2007-05-31 04:30 AM
Possibly I've found a bug in std library for STR7...
2007-05-12 12:37 AM
Look at this code in adc12.h:
inline void ADC12_ChannelSelect(ADC12_Channels ADC12_Channel) { /* Update the CSR by the value of the selected channel */ ADC12->CSR |= ADC12_Channel; } It's impossible to select channel 0 after seelcting channel 1, without manual clearing of some bits in CSR. Should be rewrited as: ADC12->CSR = (ADC12->CSR & ~(ADC_all_channels_mask)) | ADC12_Channel; Am I right or not?2007-05-13 09:43 PM
Yes you are right:
We have already detected this problem and the bug will be corrected in the next library version and the correction will be: void ADC12_ChannelSelect(ADC12_Channels ADC12_Channel) { /* Clear present selected channel */ ADC12->CSR &= 0xFFCF; /* Update the CSR by the value of the selected channel */ ADC12->CSR |= ADC12_Channel; } Thanks.[ This message was edited by: M3allem on 14-05-2007 10:56 ]2007-05-31 04:30 AM
Yes, we confirm. thanks for your information.