Hi,
I am using the C5535 ezdsp, and CCS v4 with Texas Instruments XDS100v2 USB Emulator.
I am writing code that uses some CSL and some register programming to input an analog audio signal, use the DMA to do processing, and then output UART signals that contain information about the input samples. It seems that when I am debugging and I try to read or write UART registers, or use UART CSL functions that require a handle, I get an error where the device memory bus hangs.
When i run my code using the debugger, I get an error at the line of code commented below.
Uint16 register_value;
register_value = UART_PWREMU_MGMT; // ERROR happens when trying to execute this code
UART_PWREMU_MGMT = register_value | 0x0000;
my definition for UART_PWREMU_MGMT is below:
#define UART_PWREMU_MGMT *(volatile ioport Uint16*)(0x1B18)
THis is the error I get:
Trouble Reading Memory Block at 0x1b18 on Page 2 of Length 0x1: (Error -1143 @ 0x1B18) Device memory bus has an error and may be hung. Verify that the memory address is in valid memory.
I always get this error when I write to or read from any UART register. If I replace the UART code with code that does anything else, the program runs correctly. I can write to and read from other peripheral registers, but I cannot write to and read from UART registers without receiving this error. I tried using the CSL to configure UART registers, and I get the same error when I use any function that requires a handle, which includes UART_setup, and the UART_reset function. UART_init (which does not require a handle) can be called successfully.
If, after receiving this error message, I "Disconnect from the Target", and then try to reconnect, I will get an error that says the "Device memory bus has an error and may be hung.".
1) I have already made sure that the UART is out of reset by reading from the PRCR register.
2) I have also made sure the UART CLK is enabled by writing a 0 to the UARTCG bit in the PCGCR1 register (although the tech ref. says to write a 1 when initializing UART, which I believe is a typo, because a 1 disables the UART CLK).
3) I have slowed the emulator clock (TCLK) to 100 kHz, which did not fix the problem.
4) I have tried using a different C5535, and the problem persists.
.
Why is the debugger having trouble only when reading the memory blocks related to UART? How do I clear this error?
I would greatly appreciate help in resolving this issue. I am attaching my project for reference.
Thanks,
Nate
5125.Application_1_Modified.zip
P.S. Does this have anything to do with my problem? I do not know whether I am using port B or A.
Q: Can I use port B as a UART?