Quantcast
Viewing all articles
Browse latest Browse all 262198

TMS320F28075: Can anybody please share a simple example on how to interface GPIO using CLA?

Part Number:TMS320F28075

I have tried the example listed in the thread: https://e2e.ti.com/support/microcontrollers/c2000/f/171/p/406803/1442283, but could not make it successful with my TMS320F28075.

/------------------------------GPIO config--------------------------------------------------------
EALLOW;
GpioCtrlRegs.GPAGMUX2.bit.GPIO16 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO16 = 1; // 1=OUTput, 0=INput
GpioDataRegs.GPASET.bit.GPIO16 = 1; // Set High initially
GpioCtrlRegs.GPAPUD.bit.GPIO16 = 0; // 0= enables pullup, 1= disables pullup
GpioCtrlRegs.GPACSEL3.bit.GPIO16 = 1; // 0=CPU1, 1=CPU1.CLA1, 2=CPU2, 3=CPU2.CLA
EDIS;
/------------------------added header in .cla file---------------------------------------------
#include "F28x_Project.h"
----------------------------TASK1 of iir2p2z.cla file-------------------------------------------
interrupt void Cla1Task1 ( void )
{
__mdebugstop();
GpioDataRegs.GPADAT.bit.GPIO16=1;
yn = xn*S1_B[0] + W2[1];
W2[0] = xn*S1_B[1] + yn*S1_A[1] + W1[1];
W2[1] = W2[0];
W1[0] = xn*S1_B[2] + yn*S1_A[2];
W1[1] = W1[0];
GpioDataRegs.GPADAT.bit.GPIO16=0;
// __mnop();
// __mnop();
// __mnop();
}
/---------------------------------------------------------------------------------------------------


Viewing all articles
Browse latest Browse all 262198

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>