]> Pileus Git - ~andy/csm213a-hw/commitdiff
Misc debugging
authorAndy Spencer <andy753421@gmail.com>
Thu, 13 Mar 2014 03:47:40 +0000 (03:47 +0000)
committerAndy Spencer <andy753421@gmail.com>
Thu, 13 Mar 2014 03:47:40 +0000 (03:47 +0000)
Add debug event messages
Change devices to 1 and 2
Fix bug in time transmit
Fix return code warning

hw2/main.cpp
hw2/makefile
hw2/timer_dma.c

index 3e82918134cc36d645b4ab454a9d9e56ae9b6e14..52e84aa7b242cfbe45a3a7b1c1ce7042ab28f4ed 100644 (file)
@@ -335,8 +335,8 @@ void serial_send_event(sirq_t *port, uint16_t event, uint64_t local)
 
        body.device = serial_device_id;
        body.event  = event;
-       body.world  = ltime;
-       body.local  = wtime;
+       body.world  = wtime;
+       body.local  = ltime;
 
        // Transmit message to BBB
        sirq_write(port, &head, sizeof(head));
@@ -569,6 +569,8 @@ void task_debug(uint64_t local, uint64_t world)
 
        //sirq_debug(sirq_mbed);
 
+       serial_send_event(sirq_bbb, 1, local);
+
 #ifdef VERBOSE
        sirq_printf("background - %6u.%02u -> %u.%02u\r\n",
                        (uint32_t)(local / NSEC_PER_SEC),
index 07982822dc6d5f9c0c50a8310a621a3e61e6e3f5..697aa23406ae10fcc250888b8a19e1809ca2f2ca 100644 (file)
@@ -13,8 +13,8 @@ control: control.c messages.h
 
 run: all control install.sh
        @./install.sh $(PROG).bin
-       @./control $(UART0) 0
-       @./control $(UART1) 1 sync
+       @./control $(UART0) 1
+       @./control $(UART1) 2 sync
 
 terms:
        term /dev/ttyACM0 &
index 7d06bac50e49cc7ad84c42e6ef1acc2225c0f538..9a803acc7ef4f41821ff0e0a5f940c478ad5aebf 100644 (file)
@@ -167,7 +167,7 @@ void tdma_stop(tdma_t *port, int wait)
 \r
        for (int i = 0; port->dma->dsr & DMA_DSR_BCR_BCR_MASK; i++)\r
                if (i > wait)\r
-                       return 0;\r
+                       return;\r
 \r
        // Disable DMA Mux\r
        port->mux->cfg &= DMAMUX_CHCFG_ENBL_MASK;\r