FX2LP18 TIMER0 Usage using SDCC

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
JeBo_4132831
Level 4
Level 4
25 replies posted 25 sign-ins 10 replies posted

Hi,

I would like to use TIMER0 of the FX2LP18.

I follow the code available in  https://www.cypress.com/file/134421/download 

I've adapted it cause i'm using an Eclipse Project and SDCC.

As soon as i add the TIMER0 ISR in my project, no more enumeration 😞

All works fine if i remove it.

Is there any project example using SDCC/Eclipse ?

Or Anyone could check my project ?

Regards

0 Likes
1 Solution
Pranava_YN
Moderator
Moderator
Moderator
100 likes received 500 replies posted 250 solutions authored

Hi,

Here is a thread which discusses your query in detail - https://sourceforge.net/p/sdcc/discussion/1865/thread/6010fcd1/

Please go through the following lines in KBA - https://community.cypress.com/t5/Knowledge-Base-Articles/FX2LP-I2C-Based-Debug-with-SDCC-on-Eclipse-...

"For enabling the general I2C operations, the USBJmpTb.asm file needs to be modified. This is done to hard code the address of I2C ISR since SDCC compiler, by default places the address in an arbitrary location, which will cause issues in the ISR call and the USB enumeration. " 

You can also use http://sdcc.sourceforge.net/doc/sdccman.pdf SDCC User guide for your reference as well.

Best regards,
Pranava

View solution in original post

3 Replies