MOD54415 GPIO
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
MOD54415 GPIO
Hi all,
I can't seem to find any literature on accessing and using the GPIO - NOT the rapid GPIO, just the standard GPIO pins. I only need 10 of them - can someone point me in a direction of some literature and an exmple? Thanks!
Tony
I can't seem to find any literature on accessing and using the GPIO - NOT the rapid GPIO, just the standard GPIO pins. I only need 10 of them - can someone point me in a direction of some literature and an exmple? Thanks!
Tony
Re: MOD54415 GPIO
Out of curiosity, why not use the rapid gpio?
Re: MOD54415 GPIO
Section 15 of the Freescale Users manual has the info on how to set gpio, or you could use the netburner pins class. I would take a look at the netburner data sheet to see what gpio are available, then see how to set it in sect. 15. The pin selection register is in 15.3.6 Pin Assignment Registers (PAR_x)
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 GPIO
It's technically not being used for data - they're controlling small relays through buffers. So they cannot be pulsed. The total on time could be as much as several hours, or as little as 1/10th of a second. Besides, I may end up using the Rapid GPIO for something else anyways. And I think I just found my answer as you posted it... Thanks!!!
Re: MOD54415 GPIO
Locate the pinconstant.h file in C:\nburn\MOD5441X\include
This will tell you what pins are available and how to set them.
So lets use one as an example. In that file there is the following.
// Connector: J2 / Pin: 19 / CPU Pin: N2
#define PINJ2_19_UART2_TXD ( 3 ) // Primary Function: UART 2 - Transmit
#define PINJ2_19_PWM_B3 ( 2 ) // Alternate Function 1: PWM B3 - Output Signal/Input Capture
#define PINJ2_19_SSI1_TXD ( 1 ) // Alternate Function 2: SSI 1 - Serial Transmit Data
#define PINJ2_19_GPIO ( 0 ) // Port E - 3
Lets use this pin as a GPIO pin.
Do the following.
//Initialize the pin as a GPIO pin first.
J2[19].function(PINJ2_19_GPIO);
Then to set it high to this.
J2[19] = 1;
To set low do this.
J2[19] = 0;
Dont forget to include the files for it.
#include <sim.h>
#include <pins.h>
There is an example of how to do this in the examples folder.
C:\nburn\examples\MOD5441X\RapidGPIO
This will tell you what pins are available and how to set them.
So lets use one as an example. In that file there is the following.
// Connector: J2 / Pin: 19 / CPU Pin: N2
#define PINJ2_19_UART2_TXD ( 3 ) // Primary Function: UART 2 - Transmit
#define PINJ2_19_PWM_B3 ( 2 ) // Alternate Function 1: PWM B3 - Output Signal/Input Capture
#define PINJ2_19_SSI1_TXD ( 1 ) // Alternate Function 2: SSI 1 - Serial Transmit Data
#define PINJ2_19_GPIO ( 0 ) // Port E - 3
Lets use this pin as a GPIO pin.
Do the following.
//Initialize the pin as a GPIO pin first.
J2[19].function(PINJ2_19_GPIO);
Then to set it high to this.
J2[19] = 1;
To set low do this.
J2[19] = 0;
Dont forget to include the files for it.
#include <sim.h>
#include <pins.h>
There is an example of how to do this in the examples folder.
C:\nburn\examples\MOD5441X\RapidGPIO
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 GPIO
Thanks seulater - that makes a little more sense. I'm a little new to this system, so sorry if the questions sound a little too common sense - migtated over from Texas Instruments for a small project, so any help is appreciated. Plus, my C and C++ is about 10 years old. I looked at Rapid GPIO example. it helps a little. Like I said, not sending signals, just lengthy ON OFF. Your example explains it a little better. Thanks!!
T
T
Re: MOD54415 GPIO
No need to apologize, we all have to start somewhere
It can be overwhelming when starting on a new platform to get up to speed. Though i think you will find that NB platform makes it one of the easiest to get going on.
It can be overwhelming when starting on a new platform to get up to speed. Though i think you will find that NB platform makes it one of the easiest to get going on.
-
- Posts: 192
- Joined: Mon Dec 17, 2012 6:24 am
Re: MOD54415 GPIO
It is getting surprisingly easier, considering I've been at it for 2 weeks now and the TI processor took me 3 months - and TI practically threw documentation and support at me!! Anyways, the "pinconstant.h" file - are those the pins available taking into account that some are used for the ethernet/serial ports? I need the ethernet capability, but couldn't find anywhere that shows where on the chip (port) it's connected. Any idea off the top of your head?
Re: MOD54415 GPIO
The data sheet for the netburner module has a column for gpio as well as showing all the functions for each pin. I would use that.
Re: MOD54415 GPIO
The Ethernet pins are not routed to the user Headers.
Go here and you should will find the info you need.
http://www.netburner.com/products/modules/mod54415
This .pdf explains what pins are shared.
http://www.netburner.com/component/docm ... 15?Itemid=
Hope this helps
Go here and you should will find the info you need.
http://www.netburner.com/products/modules/mod54415
This .pdf explains what pins are shared.
http://www.netburner.com/component/docm ... 15?Itemid=
Hope this helps