Open antigravity99 opened 6 years ago
in platform/srf06-cc26xx fold,different board has different peripherals configuration file,named board.h,and you can find UART pins,eg BOARD_IOID_UART_RX,BOARD_IOID_UART_TX, and try it on with USBTTL
etimer_set(&et,CLOCK_SECOND * 2);
while(true){
PROCESS_YIELD_UNTIL(ev==PROCESS_EVENT_TIMER);
if(etimer_expired(&et)){
leds_toggle(LEDS_RED);
etimer_reset(&et);
}
}
I am completely new to contiki and embedded development (just a little experience with Arduino).
I cloned contiki on an Ubuntu 17.10 VM and can compile and run simple applications to make an LED blink for a TelosB sky mote and I am trying to get the same simple application to run for the cc2650 Launchpad. It compiles just fine and the led turns on with the first 'leds_toggle(CC2650_RED_LED);' but never toggles off, which tells me something is going wrong but I have no idea as to what and 'printf' never outputs anything. I have tried using minicom connecting to both /dev/ttyACM0 and /dev/ttyACM1 but I get no printf serial output.
Here is the code:
I compile it with this command: 'sudo make clean TARGET=srf06-cc26xx BOARD=launchpad/cc2650 simple-test'
Again, this works just fine on a Sky mote, but the red led turns on and never turns off on the cc2650 launchpad and there is not printf serial output.
Any help will be greatly appreciated!
EDIT
I did some more googling around and found this page: http://sunmaysky.blogspot.com/2016/04/contiki-cc2650-adc-demo-using-dio23-as.html
I added '#define CLOCK_SECOND 128' as suggested and it now continues to run and toggle the LED off and on but I still get no printf serial output!
FIXED After I added '#define CLOCK_SECOND 128', I didn't double check my serial connection settings and baud rate was not 115200 and flow control was on. I changed the settings to 115200 8N1 None and I now get serial output on /dev/ttyACM0.