2021-03-04 01:52 PM
Hi All,
I have opened the shipped QSPI_perfs proejct and modified the syscalls.c write function to use the below code
//Debug Exception and Monitor Control Register base address
#define DEMCR *((volatile uint32_t*) 0xE000EDFCU )
/* ITM register addresses */
#define ITM_STIMULUS_PORT0 *((volatile uint32_t*) 0xE0000000 )
#define ITM_TRACE_EN *((volatile uint32_t*) 0xE0000E00 )
void ITM_SendChar(uint8_t ch)
{
//Enable TRCENA
DEMCR |= ( 1 << 24);
//enable stimulus port 0
ITM_TRACE_EN |= ( 1 << 0);
// read FIFO status in bit [0]:
while(!(ITM_STIMULUS_PORT0 & 1));
//Write to ITM stimulus port0
ITM_STIMULUS_PORT0 = ch;
}
I have also chnaged the ITM settings accordingly as per the video. I have modified the main.c to remove LCD display settings/calls.
Attached the modified project for reference. Let me know if I am missing anything here.
Any help would be highly appreciated.
Thanks,
Praveen.
2021-03-04 02:27 PM
ITM/SWV output that is corrupted suggests a mismatch in understanding of the core's clock on the host side, and the reality on the target.
2021-03-04 11:50 PM
I did suspect it is something related to clock. Reason is as I change the SWV clock in Debugger configurations I have seen faster display of more junk charactes.
Is there a way to fix this.
2021-07-07 08:08 AM
I had the same issue, but with NUCLEO-L476RG board. What helped me is to change the Core Clock frequency by 0.1MHz (go to Run->Debug Configurations->Debugger). I suppose that the internal oscillators can drift after some time, so maybe we need to blindly compensate for it.