Go Down

Topic: Difference between PIO Controller and peripheral (Read 150 times) previous topic - next topic

senioriceman

Dec 15, 2016, 02:01 pm Last Edit: Dec 15, 2016, 08:40 pm by senioriceman
Hi,

Sam3x8e datasheet says in pg. 622:

When a pin is multiplexed with one or two peripheral functions, the selection is controlled with the registers PIO_PER (PIO Enable Register) and PIO_PDR (PIO Disable Register). The register PIO_PSR (PIO Status Register) is the result of the set and clear registers and indicates whether the pin is controlled by the corresponding peripheral or by the PIO Controller.

I understand the PIO control part but what is this peripheral selection of A and B in GPIO why is it used for.



westfw

A peripheral is something like a UART or a TIMER pin.
Essentially, each pin can have one of three functions:
GPIO (PIO Controller) Example: PA0
Peripheral A (varies depending on pin.)  Example: CAN TX0
Peripheral B (varies depending on pin.)  Example: PWML3

There's a big table in chapter 9 ("Perpipherals") (page 40 in my datasheet) listing all the possibilities for each port pin.


senioriceman

Thanks for reply.

I have checked the datasheet. They are used with both pwm or communication protocols.

From what i understand they used with a PMC(PIO Clock) and Interrupt because these protocols and pwm also require timer to creat perfect waves or run smoothly. Is this correct.

If so do you have any basic usage code for a Perpipherals b pwm example.

Go Up
 


Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

Arduino
via Egeo 16
Torino, 10131
Italy