Skip to main content
Topic: Webplatform Contiki 2.5 port (Read 49728 times) previous topic - next topic

Re: Webplatform Contiki 2.5 port

Reply #15
Hi all.

Okay, I am trying to get my web Platform board working with this contiki. I managed to proggramme the hex file but my board does not seem to be outputing the standard board rate. I have an original Platform v1c board. Does this make any difference?

I ran the DP Webplatform announce listener and I get the following.

Got UDP packet: HELLO CONTIKI_VERSION_STRING ETH 00:04:a3:03:00:db IP 0.0.0.0 RTC 2011-08-24T21:49:01Z
GUI thread recieved {'IP': '0.0.0.0', 'ETH': '00:04:a3:03:00:db', 'HELLO': 'CONTIKI_VERSION_STRING', 'RTC': '2011-08-24T21:49:01Z'}

So something is working but not really sure what is going on?

Any pointers?

Thanks

Trev

Re: Webplatform Contiki 2.5 port

Reply #16
Okay, further updates. I have my usart working through the usb at a baud rate of 128000bps? I programmed the hex with pickit2. Have I maybe upset the configuration bits?

Thanks

Trev

Re: Webplatform Contiki 2.5 port

Reply #17
Okay, I had actually changed the configuration bits somewhere along the way. The FOSCSEL was wrong. Once I changed this the system came up and all worked great.

Re: Webplatform Contiki 2.5 port

Reply #18
The configuration bits aren't set properly when I build with the contiki "make" system for some reason I've never tracked down... so those hex files need some help if you flash them to a naked board.

To work around I set config bits explicitly with the Microchip pickit3 programmer, or else use the USB serial -programmer firmware  DP uses as that does not seem to overwrite working config bits with bad ones. anyway glad it works for you :-)

Re: Webplatform Contiki 2.5 port

Reply #19
Yeah, thanks. I am pretty impressed with this port. It looks great. Well done.

Trev

Re: Webplatform Contiki 2.5 port

Reply #20
Glad you got it. This is indeed a great port. We have something cooking for it right now :)
Got a question? Please ask in the forum for the fastest answers.

Re: Webplatform Contiki 2.5 port

Reply #21
Ian, you cant just drop messages like that with no hint at all. Spill the beans...what you got cooking?

Re: Webplatform Contiki 2.5 port

Reply #22
I'd really like to hook some buttons on the web page to the LED's to make the demo better, plus post sensor readings to Patchube or  something. I have a way to read/rewrite pages to the flash eeprom, it's basic (and small) one day I'll get that cleaned up and uploaded to Github. Then we might have a possible WP default firmware on our hands :-)

My own use for the port is a 7-day multi-zone heating controller: DS18S20 temp probes, a relay, solenoid controllers (w/ SN754410). I was trying to put together another board for a LCD/joystick control but never got it finished.

Re: Webplatform Contiki 2.5 port

Reply #23
Hi. Can someone explain to me how the printf is working in this port. I cant find where the uart is configured and hooked up to the printf stuff?

Thanks

Trev

Re: Webplatform Contiki 2.5 port

Reply #24
I put a comment at the very bottom of https://github.com/shuckc/contiki-mirro ... m/serial.c - in short, PIC30 C library defaults write() to UART1, so it's taken care of.

Code: [Select]
void dbg_setup_uart(void)
{    ...
//peripheral setup
    U1BRG = 85;              //86@80mhz, 85@79.xxx=115200
    U1MODE = 0;              //clear mode register
    U1MODEbits.BRGH = 1;    //use high percison baud generator
    U1STA = 0;              //clear status register
    U1MODEbits.UARTEN = 1;  //enable the UART RX
    IFS0bits.U1RXIF = 0;    //clear the receive flag
    U1STAbits.UTXEN = 1;    //enable UART TX
// with PIC30 compiler standard library the default printf() calls
/// write(), which is soft-linked to the library default write() function
// outputing to UART1
}

Re: Webplatform Contiki 2.5 port

Reply #25
Brilliant, thanks for that.

Re: Webplatform Contiki 2.5 port

Reply #26
Anyone had any luck compiling the REST example?

Re: Webplatform Contiki 2.5 port

Reply #27
Hi,

Really like the work you did on the Contiki port. How much work do you think it is to get Contiki working on the PIC24F156DA206? This has more IO and memory available. Lots of it!

Thanks

Trev

Re: Webplatform Contiki 2.5 port

Reply #28
No idea, I don't know the PIC24 architecture well enough to comment. The PIC32 port took me about a week to get going, albeit the Ethernet driver was already running by others, so I only had to do the Contiki wrapper.

Re: Webplatform Contiki 2.5 port

Reply #29
Okay, thanks for the reply. Really like your port, thanks for sharing.