Hello,
i know this is a rather stupid question, but i'm somewhat irritated.
I'm triing to send some data per Uartlite. For normal characters/strings everything works fine, but if i try to send some integers or long integers they aren't displayed.
(Short) example:
...
/* global definitions, no pointers */ Xuint32 interrupt_count = 0; volatile Xuint32 jiffies = 0;
...
/* values incrementd during pit-isr, pit works, pit running at 100HZ
*/ void pit_timer_int_handler(void * baseaddr_p) { jiffies++; interrupt_count++; XTime_TSRClearStatusBits(XREG_TSR_PIT_INTERRUPT_STATUS); }...
main(){
/* string displayed correctly */ xil_printf("\r\nRunning Mainloop");
while(1){ sleep(2); xil_printf("\nLoop");
/* here the values aren't displayed,but the "a"s and "b"s are displayd
*/ xil_printf("\n %l a", i_interrupt_count); xil_printf("\n %l b", l_interrupt_count); /* giving the arguments as pointers won't help either */ xil_printf("\n %l a", &i_interrupt_count); xil_printf("\n %l b", &l_interrupt_count); } }i have tried different compinations with "%d","%D","%l","%ul" or "%c" as format-strings and different datatypes for the two variables (unisgned, int, long, unsigned long).
i was looking at the xil_printf sources, too, to see what characters after "%" are supported.
I'm using an uartlite at 9600 baud, 8 databits, no parity.
So, does someone might have an idea or hint what my mistake is?
Regards Patrick