speed issues

General discussion on mikroPascal PRO for ARM.
Post Reply
Author
Message
Nebulix
Posts: 9
Joined: 30 Mar 2015 11:43

speed issues

#1 Post by Nebulix » 09 Apr 2015 15:29

Hello
I tested the speed of my mini-m4.
In an infinite loop I inserted :
1) GPIOc_ODR := not(GPIOb_IDR);
inputting a TTL square signal at B0 and observing C0. I got a decent result below 200kHz
2) for i:=0 to 10 do DAC1_Ch1_Output(400*i);
each step lasted about 6.5 µsec
3) value := ADC1_Get_Sample;
DAC1_Advanced_Ch1_Output (4095-value, conf1);
and got a cycle time of about 25 µseconds
I expected faster responses. Is there a way I missed to accelerate ?
Thanks

User avatar
marina.petrovic
Posts: 2986
Joined: 18 Apr 2013 08:11

Re: speed issues

#2 Post by marina.petrovic » 14 Apr 2015 11:53

Hi,

I believe that I answered you on this question via our support desk.

Best regards,
Marina

Nebulix
Posts: 9
Joined: 30 Mar 2015 11:43

Re: speed issues

#3 Post by Nebulix » 14 Apr 2015 15:49

Hi Marina
The document says : "This clock (ADCCLK) is generated from the APB2 clock divided by a programmable prescaler that
allows the ADC to work at fPCLK2/2, /4, /6 or /8." By browsing through te 1718 pages I may find an answer ...
By investigating the asm transcript I got convinced that the cpu clock was rightly settled. I have also tried to insert some asm statements in my code ( copied from the asm file) and GOT ERRORS because MOVW and MOVT are considered as invalid instructions !
asm
MOVW R0, 1073874964
MOVT R0, 16386
LDR R0, [R0, #0]
MVN R1, R0
MOVW R0, 1073874964
MOVT R0, 16386
STR R1, [R0, #0]
end;
Regards
Gilbert

Post Reply

Return to “mikroPascal PRO for ARM General”