Seems to be an interesting chip, and I can see there is some arduino ide support.
Gullik
Search found 43 matches
- Mon Oct 17, 2022 7:13 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
Well, I was just testing to see how it works.
One idea was to make a simple logic analyzer, aka Salae, but with twice the bits, and 60 Mhz sample rate. If one locks out interrupts, or never enable
them while collecting samples it *could* be done with programmed I/O.
However, doing it with DMA ...
One idea was to make a simple logic analyzer, aka Salae, but with twice the bits, and 60 Mhz sample rate. If one locks out interrupts, or never enable
them while collecting samples it *could* be done with programmed I/O.
However, doing it with DMA ...
- Tue Sep 20, 2022 1:50 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
And, END of investigation:
A straight sequence of assmbly iread/write statements produces a jitterfree square wave on the io pins.
asm volatile (
"gpiobport = 0x40010c0c \n\t"
"ldr r1, =datarray \n\t"
"ldr r2, =gpiobport \n\t"
"ldrh r0, [r2],#0 \n\t"
"str.w r0, [r1],#2 \n\t"
"ldrh r0, [r2 ...
A straight sequence of assmbly iread/write statements produces a jitterfree square wave on the io pins.
asm volatile (
"gpiobport = 0x40010c0c \n\t"
"ldr r1, =datarray \n\t"
"ldr r2, =gpiobport \n\t"
"ldrh r0, [r2],#0 \n\t"
"str.w r0, [r1],#2 \n\t"
"ldrh r0, [r2 ...
- Mon Sep 19, 2022 8:03 am
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
"I don't see why you need "& 0xffff" on those statements, but fortunately the compiler seems to be smart enough to achieve that just by the choice of instructions to use."
Well, i got a problem trying to write a 16-bit (uint16_t) into a 32 bit register (uint32_t). The & 0xffff is interpreted as ...
Well, i got a problem trying to write a 16-bit (uint16_t) into a 32 bit register (uint32_t). The & 0xffff is interpreted as ...
- Sun Sep 18, 2022 3:35 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
Now with redeclared GPIOB definition
volatile unsigned int *GPIOBPORT = (volatile unsigned int *)0x40010C0C;
I have the unrolled loop:
datptr = &datarray[0];
snapshot = *DWT_CYCCNT;
*GPIOBPORT = *datptr++ & 0xffff;
*GPIOBPORT = *datptr++ & 0xffff;
*GPIOBPORT = *datptr++ & 0xffff;
total of ...
volatile unsigned int *GPIOBPORT = (volatile unsigned int *)0x40010C0C;
I have the unrolled loop:
datptr = &datarray[0];
snapshot = *DWT_CYCCNT;
*GPIOBPORT = *datptr++ & 0xffff;
*GPIOBPORT = *datptr++ & 0xffff;
*GPIOBPORT = *datptr++ & 0xffff;
total of ...
- Sat Sep 17, 2022 11:09 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
Tnx ozcar,
Yes, I have thougt about optimizations, unfortunately this is not a choice with the AT32F403A, at least not from the menu.
Also, the attribute volatile will / might change the compiler code generator. I will check this out.
Right now I am getting confusing results.
The loop
for(k=0;k ...
Yes, I have thougt about optimizations, unfortunately this is not a choice with the AT32F403A, at least not from the menu.
Also, the attribute volatile will / might change the compiler code generator. I will check this out.
Right now I am getting confusing results.
The loop
for(k=0;k ...
- Sat Sep 17, 2022 10:39 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
Granted::
it doesn't seem to be what your code is doing.
Correct: No the printing of a fixed string screws that up of course, this would have been better.
scratch = *DWT_CYCCNT - snapshot;
Serial.print("Whatever");
Serial.println(scratch);
would be better. However, I am alternating with ...
it doesn't seem to be what your code is doing.
Correct: No the printing of a fixed string screws that up of course, this would have been better.
scratch = *DWT_CYCCNT - snapshot;
Serial.print("Whatever");
Serial.println(scratch);
would be better. However, I am alternating with ...
- Sat Sep 17, 2022 4:33 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
"did a quick scan and not sure if i got what you were trying to do. but to get accurate timing, don't blend your serial output in there."
I figured the Serial.printf is executed AFTER the calculation of (*DWT_CYCCNT - snapshot) which means it does not matter,
To explain what I am trying to do, is ...
I figured the Serial.printf is executed AFTER the calculation of (*DWT_CYCCNT - snapshot) which means it does not matter,
To explain what I am trying to do, is ...
- Sat Sep 17, 2022 2:26 pm
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
Hello dannyf (and others)
I have actually done what you suggested, but am now stuck with something different......
Now I have struck another problem, which I guess is either the c compiler or objdump
It seems to me that the compiler will not generate code for all these output statements
OR that ...
I have actually done what you suggested, but am now stuck with something different......
Now I have struck another problem, which I guess is either the c compiler or objdump
It seems to me that the compiler will not generate code for all these output statements
OR that ...
- Fri Sep 16, 2022 10:10 am
- Forum: Off topic
- Topic: AT32F403A anyone?
- Replies: 71
- Views: 399302
Re: AT32F403A anyone?
My foggy understanding is clearing up......
"The result is a square wave on the pins, 30nS high and 30nS low, which equates to 16.67 Mhz, i.e. each sample 33 Mhz. It seems the cpu takes
5 instructions to write a word to GPIO. CPU clock is 240 Mhz as I have configured it. I would have hoped for a ...
"The result is a square wave on the pins, 30nS high and 30nS low, which equates to 16.67 Mhz, i.e. each sample 33 Mhz. It seems the cpu takes
5 instructions to write a word to GPIO. CPU clock is 240 Mhz as I have configured it. I would have hoped for a ...