FORUM TOPIC · READ ONLY

possible bug using 2 ADC - solved

possible bug using 2 ADC - solved

Forum : bug reports

5 message(s) · archive en lecture seule

MHuy
Hello Lubin,



I try to compile this model but it doesn't work.



It writes the following message in the command window.


dsPIC_DMA_Buffers.c:3: error: syntax error before 'ADCBuffChannelDMA' 
dsPIC_DMA_Buffers.c:3: warning: data definition has no type or storage class 
gmake: *** [dsPIC_DMA_Buffers.o] Error 255 


In the file "dsPIC_DMA_Buffers.c", there is no include of "test_ADC_private.h" (NameOfTheModel_private.h) where the variable ADCBuffChannelDMA as the type extern.


//dsPIC_DMA_Buffers.c
#include "p33fxxxx.h"

volatile uint16_T ADCBuffChannelDMA[(2)] __attribute__((space(dma),aligned(256)));


//test_ADC_private.h
extern volatile uint16_T ADCBuffChannelDMA[(2)] __attribute__((space(dma),aligned(256)));


Does the compilation error come from that problem? or do you have an other idea?



Thanks for your help!



Michael



PS : I use the dsPIC33FJ128GP802 chip.

Pièce jointe : test_ADC.mdl

LubinKerhuel

Re: possible bug using 2 ADC

Which blockset version are you working with ? (0.99c ?)



Lubin
MHuy

Re: possible bug using 2 ADC

I use the 0.99b, is it working with the 0.99c?
LubinKerhuel

Re: possible bug using 2 ADC

I corrected a bug similar to this one just before publishing the 0.99c version.

I thought that this bug was not present yet in the 0.99b, but it may be the same.



Anyway, could you test your model using the 0.99c version ?

(Note that the 0.99c version on the website is depicted as 0.99b+ at the matlab command "ver". That is the last bug I found ! not really important...)



Let me know if you still have this bug...



Lubin
MHuy

Re: possible bug using 2 ADC

There is no more bug with the v0.99c!



Thanks for your help Lubin



Michael