I'm trying to use the internal RTC of TM4C128E with TI-RTOS http example
I found some information on Page 289 of the TivaWare-C Documantation (spmu298a.pdf).
I added the header to my sourcefile
/* XDCtools Header files */ #include <xdc/std.h> #include <xdc/cfg/global.h> #include <xdc/runtime/System.h> /* BIOS Header files */ #include <ti/sysbios/BIOS.h> /* TI-RTOS Header files */ #include <ti/drivers/GPIO.h> #include <ti/drivers/UART.h> /* Example/Board Header files */ #include "Board.h" #include <stdint.h> //#include "inc/hw_hibernate.h" #include <driverlib/hibernate.h> Void techoFxn(UArg arg0, UArg arg1) { char input; UART_Handle uart; UART_Params uartParams; const char echoPrompt[] = "\fEchoing X characters:\r\n"; ui32Status = HibernateIntStatus(0); HibernateIntClear(ui32Status); HibernateCalendarGet(&temptime); temptime.tm_sec = 0xFF; HibernateCalendarMatchSet(0,&temptime); HibernateIntEnable(HIBERNATE_INT_RTC_MATCH_0); while (!(HibernateIntStatus(0))); // waits for any interrupt (there is only one type enabled) TimerEnable(TIMER7_BASE, TIMER_A); ui32Status = HibernateIntStatus(0); HibernateIntClear(ui32Status); HibernateIntDisable(HIBERNATE_INT_RTC_MATCH_0); /* Create a UART with data processing off. */ UART_Params_init(&uartParams); uartParams.writeDataMode = UART_DATA_BINARY; uartParams.readDataMode = UART_DATA_BINARY; uartParams.readReturnMode = UART_RETURN_FULL; uartParams.readEcho = UART_ECHO_OFF; uartParams.baudRate = 115200; uart = UART_open(Board_UART0, &uartParams); if (uart == NULL) { System_abort("Error opening the UART"); } UART_write(uart, echoPrompt, sizeof(echoPrompt)); /* Loop forever echoing */ while (1) { UART_read(uart, &input, 1); UART_write(uart, &input, 1); } }
My Question is:
What is the difference between inc/hw_hibernate.h and driverlib/hibernate.h ?
Why do i get this Errors: bool is undefined?
"/home/tuxx/ti/tirtos_tivac_2_14_00_10/products/TivaWare_C_Series-2.1.1.71b/driverlib/hibernate.h", line 246: error #20: identifier "bool" is undefined
"../techo.c", line 36: error #20: identifier "ui32Status" is undefined
"../techo.c", line 38: error #20: identifier "temptime" is undefined
"../techo.c", line 43: warning #225-D: function "TimerEnable" declared implicitly
"../techo.c", line 43: error #20: identifier "TIMER7_BASE" is undefined
"../techo.c", line 43: error #20: identifier "TIMER_A" is undefined
8 errors detected in the compilation of "../techo.c".