Answered step by step
Verified Expert Solution
Question
1 Approved Answer
I provided uart communication via debug port, but I could not provide this function with the pins, I did the configuration of the pins in
I provided uart communication via debug port, but I could not provide this function with the pins, I did the configuration of the pins in the code, but I guess I can't get output, can you help? I want to make the output between URx and UTx I am new to this platform, I apologize in advance if I have given incomplete or incorrect information.
Im using TMC with Code Composer Std
#include
#include
#include
#include "inchwints.h
#include "inchwmemmap.h
#include "inchwtypes.h
#include "inchwuart.h
#include "driverlibfpuh
#include "driverlibgpioh
#include "driverlibinterrupth
#include "driverlibpinmap.h
#include "driverlibromh
#include "driverlibrommap.h
#include "driverlibsysctlh
#include "driverlibsystickh
#include "driverlibuarth
#include "driverlibudmah
#include "utilscpuusage.h
#include "utilsuartstdioh
#include "utilsustdlibh
#include "driverlibtimerh
uintt guiSysClock;
bool gledBlinking false;
uintt guiCPUUsage;
#define SYSTICKSPERSECOND
void TimerBegin
SysCtlPeripheralEnableSYSCTLPERIPHTIMER;
TimerConfigureTIMERBASE, TIMERCFGONESHOT;
TimerLoadSetTIMERBASE, TIMERA guiSysClock ;
TimerIntEnableTIMERBASE, TIMERTIMATIMEOUT;
TimerEnableTIMERBASE, TIMERA;
while TimerIntStatusTIMERBASE, false
TimerIntClearTIMERBASE, TIMERTIMATIMEOUT;
if gledBlinking
GPIOPinWriteGPIOPORTNBASE, GPIOPIN GPIOPIN;
else
GPIOPinWriteGPIOPORTNBASE, GPIOPIN;
gledBlinking gledBlinking;
void PrintAsciiCodeAndNamechar character
UARTprintfc ASCII Code: d
character, character;
void PrintMyNameAscii
const char myName "MEHMET ABIYE TESEKKURLER ;
int i;
while
for i ; myNamei; i
Print ASCII code and name for the current character
PrintAsciiCodeAndNamemyNamei;
GPIOPinWriteGPIOPORTNBASE, GPIOPIN GPIOPIN;
Wait for seconds using TimerBegin
TimerBegin;
GPIOPinWriteGPIOPORTNBASE, GPIOPIN;
Wait for seconds using TimerBegin
TimerBegin;
gledBlinking gledBlinking;
void SysTickHandlervoid
void uDMAErrorHandlervoid
void uDMAIntHandlervoid
void UARTIntHandlervoid
void ConfigureUARTvoid
Enable the peripherals for UART and GPIOA
MAPSysCtlPeripheralEnableSYSCTLPERIPHGPIOA;
MAPSysCtlPeripheralEnableSYSCTLPERIPHUART;
Configure the UART pins PA UART RX PA UART TX
MAPGPIOPinConfigureGPIOPPURX;
MAPGPIOPinConfigureGPIOPPUTX;
MAPGPIOPinTypeUARTGPIOPORTABASE, GPIOPIN GPIOPIN;
Configure the UART to baud, N format
UARTConfigSetExpClkUARTBASE, guiSysClock,
UARTCONFIGWLEN UARTCONFIGSTOPONE
UARTCONFIGPARNONE;
Enable UART
UARTEnableUARTBASE;
Enable UART for sleep mode
MAPSysCtlPeripheralSleepEnableSYSCTLPERIPHUART;
Configure UART stdio
UARTStdioConfig guiSysClock;
int mainvoid
guiSysClock MAPSysCtlClockFreqSet
SYSCTLXTALMHZ SYSCTLOSCMAIN SYSCTLUSEPLL
SYSCTLCFGVCO
;
MAPSysCtlPeripheralEnableSYSCTLPERIPHGPION;
MAPGPIOPinTypeGPIOOutputGPIOPORTNBASE, GPIOPIN;
ConfigureUART;
UARTprintfJH;
UARTprintfString & ASCII
;
UARTprintfTiva C Series @ u MHz
guiSysClock ;
MAPSysTickPeriodSetguiSysClock SYSTICKSPERSECOND;
MAPSysTickIntEnable;
MAPSysTickEnable;
while
TimerBegin;
PrintMyNameAscii;
MAPSysCtlSleep;
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started