Technical discussions about the TI C6000 DSPs (including the c62x, c64x and c67x DSPs).
Hi I'm new to all things DSP and I'm having problems understanding some of the instructions for using some of the MCBSP signals as GPIO on a c6711 DSK.... I'm confused about the use of of the CSL instruction "MCBSP_setPins" that clams to set the status of MCBSP signals configured as GPIO. It accepts a handle and a signal name.... My question is how do I specify whether to set the signal high or low??? On a related note, I've noticed the instruction "SET_PIN" in some of TI's examples... WHere can I find the include file for this??? Thanks in advance Steve Minshull______________________________
The signals you specify are set high, the rest are all set low. Mike -----Original Message----- From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of s_minshull Sent: Monday, July 17, 2006 7:55 AM To: c...@yahoogroups.com Subject: [c6x] MCBSP as GPIO woes Hi I'm new to all things DSP and I'm having problems understanding some of the instructions for using some of the MCBSP signals as GPIO on a c6711 DSK.... I'm confused about the use of of the CSL instruction "MCBSP_setPins" that clams to set the status of MCBSP signals configured as GPIO. It accepts a handle and a signal name.... My question is how do I specify whether to set the signal high or low??? On a related note, I've noticed the instruction "SET_PIN" in some of TI's examples... WHere can I find the include file for this??? Thanks in advance Steve Minshull
Is there any way of toggling individual signals rather than having to specify each signal every time you call the function?? --- In c...@yahoogroups.com, "Mike R" <dsprelated@...> wrote: > > The signals you specify are set high, the rest are all set low. > > Mike > > -----Original Message----- > From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of > s_minshull > Sent: Monday, July 17, 2006 7:55 AM > To: c...@yahoogroups.com > Subject: [c6x] MCBSP as GPIO woes > > Hi > > I'm new to all things DSP and I'm having problems understanding some > of the instructions for using some of the MCBSP signals as GPIO on a > c6711 DSK.... > > I'm confused about the use of of the CSL instruction "MCBSP_setPins" > that clams to set the status of MCBSP signals configured as GPIO. It > accepts a handle and a signal name.... > > My question is how do I specify whether to set the signal high or low??? > > On a related note, I've noticed the instruction "SET_PIN" in some of > TI's examples... WHere can I find the include file for this??? > > Thanks in advance > > Steve Minshull______________________________
Steve- > Is there any way of toggling individual signals rather than having to > specify each signal every time you call the function?? You can go a little faster by using direct instructions instead of CSL function calls. For example this line writes to TIMER1 control register, makes TOUT1 a GPIO, sets TOUT1 pin to high: *(unsigned volatile int*)TIMER1_CTRL = ((*(unsigned volatile int*)TIMER1_CTRL) & 0xFFFFFFFA) | 4; You can do similar for McBSP and GPIO registers. Also you might want to disable and re-enable interrupts around such access. But this is only going to gain some speed. If I recall, C671x limits successive I/O pin access to around 90 nsec, so that's the lower limit. This has to do with internal CPU bus stalls. -Jeff > --- In c...@yahoogroups.com, "Mike R" <dsprelated@...> wrote: > > > > The signals you specify are set high, the rest are all set low. > > > > Mike > > > > -----Original Message----- > > From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of > > s_minshull > > Sent: Monday, July 17, 2006 7:55 AM > > To: c...@yahoogroups.com > > Subject: [c6x] MCBSP as GPIO woes > > > > Hi > > > > I'm new to all things DSP and I'm having problems understanding some > > of the instructions for using some of the MCBSP signals as GPIO on a > > c6711 DSK.... > > > > I'm confused about the use of of the CSL instruction "MCBSP_setPins" > > that clams to set the status of MCBSP signals configured as GPIO. It > > accepts a handle and a signal name.... > > > > My question is how do I specify whether to set the signal high or low??? > > > > On a related note, I've noticed the instruction "SET_PIN" in some of > > TI's examples... WHere can I find the include file for this??? > > > > Thanks in advance > > > > Steve Minshull > > > > > > > > > > > > > > > >______________________________
Various options: - Use MCBSP_getPins to get the current pin settings, modify and write back using MCBSP_setPins. - Use the MCBSP_RGETH and MCBSP_RSETH macros to read, modify and write the PCR register. Either of these could be encapsulated as your own macro to keep the main code cleaner. Mike -----Original Message----- From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of s_minshull Sent: Tuesday, July 18, 2006 5:49 AM To: c...@yahoogroups.com Subject: [c6x] Re: MCBSP as GPIO woes Is there any way of toggling individual signals rather than having to specify each signal every time you call the function?? --- In c...@yahoogroups.com, "Mike R" <dsprelated@...> wrote: > > The signals you specify are set high, the rest are all set low. > > Mike > > -----Original Message----- > From: c...@yahoogroups.com [mailto:c...@yahoogroups.com] On Behalf Of > s_minshull > Sent: Monday, July 17, 2006 7:55 AM > To: c...@yahoogroups.com > Subject: [c6x] MCBSP as GPIO woes > > Hi > > I'm new to all things DSP and I'm having problems understanding some > of the instructions for using some of the MCBSP signals as GPIO on a > c6711 DSK.... > > I'm confused about the use of of the CSL instruction "MCBSP_setPins" > that clams to set the status of MCBSP signals configured as GPIO. It > accepts a handle and a signal name.... > > My question is how do I specify whether to set the signal high or low??? > > On a related note, I've noticed the instruction "SET_PIN" in some of > TI's examples... WHere can I find the include file for this??? > > Thanks in advance > > Steve Minshull______________________________