AT32F403A anyone?

Anything not related to STM32
dannyf
Posts: 447
Joined: Sat Jul 04, 2020 7:46 pm

Re: AT32F403A anyone?

Post by dannyf »

A straight sequence of assmbly iread/write statements produces a jitterfree square wave on the io pins.
probably not: interrupts happening in the background will update such output. Using spi / pwm or dma/port would be the way to go if you wish.

Code: Select all

		for (tmp=0; tmp<10000/50; tmp++) {
			GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); 
			GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); 
			GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); 
			GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); 
			GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); GIO_FLP(GPIOB, 1<<0); 
			};	
		//80.5k/10k ticks @ -O1
The above code runs on 80.5K ticks per 10K pin flip, on a W801 chips (up to 240Mhz). to 30Mps, on a $2 mcu :)

This particular chip has a high speed spi, driven by a 160Mhz clock. so you can do 80Mbps without breaking a sweat, and truly jitter free.
webjorn
Posts: 43
Joined: Sat Jul 09, 2022 8:49 pm

Re: AT32F403A anyone?

Post by webjorn »

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, enables the possibility for the cpu to search for triggers in the stream or somesuch.

Right now the biggest drawback / problem is that there is no (very little) library for arduino, although there IS a lib for Arterys Starter board,
but only for Kiel or IAR.

This is no problem if you use a bare bone linux system for compile, but I find the Arduino source tree strange, and with no control
for me to add the library in. Just a bit more work to get things to compile....

But, after some revisions at least it is possible to add a json url to preferences, and then add "WeAct at32f403a black pill" with board manager.

https://github.com/WeActStudio/ArduinoCore-AT32F4

It used to be win only.....

And, there is a difference in transmitting an array in or out, vs. just flipping gpio port bits....

Regards,

Gullik
Post Reply

Return to “Off topic”