Commit 573d72ba authored by Stefan Tauner's avatar Stefan Tauner
Browse files

Use ROM_ function to get approximately correct timing

parent 1ac48838
......@@ -11,11 +11,13 @@
#define TARGET_IS_TM4C129_RA2
#include <stdbool.h> /*driverlib header requires stdbool.h to be included a first header file before any driverlib header*/
#include <stdint.h>
#include <driverlib/gpio.h>
#include <driverlib/pin_map.h>/*supplies GPIO_PIN_x*/
#include <driverlib/sysctl.h>
#include <driverlib/rom.h>
#include <inc/hw_memmap.h>/*supplies GPIO_PORTx_BASE*/
/*Controller is initially clocked with 16MHz*/
......@@ -44,15 +46,6 @@ void main (void) {
/*write value of val to pin 1 of port n*/
// for(ui32Loop = 0; ui32Loop < 400000; ui32Loop++){}
SysCtlDelay(F_CPU/6); //approx 0,5 s
ROM_SysCtlDelay(F_CPU/2/3); //approx 0,5 s
  • Warum hast du die ROM_ Funktion eingeführt? Die Idee der ROM Vermeidung war ja gerade zu zeigen das Delayfunktionen kein präzises Timing ermöglichen.

Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment