Hi Raphael,

> Before we dig any deeper: did you disable the extended instruction set using
> something like
> __code char __at(__CONFIG4L) conf4l = _XINST_OFF_4L;
> 

I have following config: 
__code char __at(__CONFIG1H) conf1h = 0x08; // Select HS OSC
__code char __at(__CONFIG2L) conf2l = 0x00; // BOREN disabled, PWRTEN enabled
__code char __at(__CONFIG2H) conf2h = 0x00; // WDT disabled
__code char __at(__CONFIG3H) conf3h = 0x00; // digi RB pins, TMR1 normal
__code char __at(__CONFIG4L) conf4l = 0x81; // Disable LVP, disable ext. mode

So I assume it is disabled.

I prepared sample project which is attached. On terminal, I get following 
result:
0xF0=0x00_00_00; 0xF1=0x00_01_01; 0xF2=0x00_00_00; 0xF3=0x00_17_17; 
0xF4=0x00_40_40; 0xF5=0x00_00_00; 0xF6=0x00_00_00; 0xF7=0x00_00_00; 
0xF8=0x00_00_00; 0xF9=0x00_4A_4A; 0xFA=0x00_00_00; 0xFB=0x00_00_00; 
0xFC=0x00_00_00; 0xFD=0x00_00_00; 0xFE=0x00_63_63; 
0xF0=0x00_00_00; 0xF1=0x0F_03_03; 0xF2=0x0F_DE_DE; 0xF3=0x0F_83_83; 
0xF4=0x0F_DF_DF; 0xF5=0x0F_E8_E8; 0xF6=0x0F_B5_B5; 0xF7=0x0F_49_49; 
0xF8=0x0F_9A_9A; 0xF9=0x0F_FE_FE; 0xFA=0x0F_42_42; 0xFB=0x0F_BB_BB; 
0xFC=0x0F_02_02; 0xFD=0x0F_3F_3F; 0xFE=0x0F_14_14; 

The output is ADDRESS=STATE_DATA_ReturnedDATA . The correct output is the 
latter one from CC1100_read_correct() - CC1100 returns 0x0F as a length of free 
FIFO. Output from CC1100_read() generates some really strange values.

I have probably set something in the PIC SPI wrong way. But I don't see it. 
Maybe it is a bug of SDCC - who knows ?

Thank you for help,
Vaclav

BTW> I updated SDCC to version 2.8.4 #5252 (Oct 20 2008)

Attachment: CC1100_SPI_problem.tar.gz
Description: GNU Zip compressed data

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Sdcc-user mailing list
Sdcc-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sdcc-user

Reply via email to