CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

Search found 25 matches
CCS Forum Index
Author Message
  Topic: Unexpected behaviour when casting to enum
SamMeredith

Replies: 2
Views: 1291

PostForum: General CCS C Discussion   Posted: Fri Feb 14, 2025 6:38 am   Subject: Unexpected behaviour when casting to enum
Thanks Ttelmah, I'll report it to CCS.

I was trying to find a proper reference in the C spec but couldn't find one. As far as I could see enums in standard C will never be smaller than a char anywa ...
  Topic: Unexpected behaviour when casting to enum
SamMeredith

Replies: 2
Views: 1291

PostForum: General CCS C Discussion   Posted: Thu Feb 06, 2025 12:22 pm   Subject: Unexpected behaviour when casting to enum
Compiler verson: 5.118
Device: DSPIC33EP512MC806

Consider the following example code:


#include <33EP512MC806.h>

// #device CCS2

#case

#use delay( crystal=12Mhz, clock=120Mh ...
  Topic: can-pic24 deprecated
SamMeredith

Replies: 1
Views: 5965

PostForum: General CCS C Discussion   Posted: Mon Sep 25, 2023 4:59 am   Subject: can-pic24 deprecated
I have an old project using the can-pic24 driver which I notice is deprecated.
I do not see a reason either in this driver or the suggested newer driver.

Does anyone know why the can-pic24 driver ...
  Topic: #int_default with PCD compiler
SamMeredith

Replies: 9
Views: 28663

PostForum: General CCS C Discussion   Posted: Thu Nov 18, 2021 10:50 am   Subject: #int_default with PCD compiler
Okay, that makes sense.

I have removed the interrupts from my bootloader, using polling-based methods instead as you've suggested elsewhere.
So I can just rely on the jump_to_isr() routine to hand ...
  Topic: #int_default with PCD compiler
SamMeredith

Replies: 9
Views: 28663

PostForum: General CCS C Discussion   Posted: Thu Nov 18, 2021 4:56 am   Subject: #int_default with PCD compiler
A follow-up question about this statement:

On PCD, things are very different, since the hardware automatically
calls the individual routines for the individual interrupts.
(How) does this change ...
  Topic: #int_default with PCD compiler
SamMeredith

Replies: 9
Views: 28663

PostForum: General CCS C Discussion   Posted: Thu Nov 18, 2021 3:07 am   Subject: #int_default with PCD compiler
Thanks all.
I still wasn't 100% clear, so here are some concrete examples.
They mostly back up Ttelmah's points (though with one surprise).

All examples using a dsPIC33EP512MC806 with compiler V5 ...
  Topic: #int_default with PCD compiler
SamMeredith

Replies: 9
Views: 28663

PostForum: General CCS C Discussion   Posted: Wed Nov 17, 2021 12:01 pm   Subject: #int_default with PCD compiler
The following line from the #int_default description in the CCS manual is not clear to me:

Description:
The following function will be called if the device triggers an interrupt and none of the ...
  Topic: ROM structs with self-referencing elements
SamMeredith

Replies: 3
Views: 16949

PostForum: General CCS C Discussion   Posted: Wed Oct 06, 2021 10:07 am   Subject: ROM structs with self-referencing elements
Thanks, that works.


typedef struct menu {
uint8_t id;
char const *text;
//struct menu const *children[MAX_CHILDREN];
int32_t const *children[MAX_CHILDREN] ...
  Topic: ROM structs with self-referencing elements
SamMeredith

Replies: 3
Views: 16949

PostForum: General CCS C Discussion   Posted: Wed Oct 06, 2021 8:31 am   Subject: ROM structs with self-referencing elements
I am trying to store some menus in a tree:


#device CONST=ROM

typedef struct menu {
uint8_t id;
char const *text;
struct menu *children[MAX_CHILDREN];
} menu_t ...
  Topic: dsPIC Buffered Serial TX - INT_TBE
SamMeredith

Replies: 5
Views: 22616

PostForum: General CCS C Discussion   Posted: Wed Jul 07, 2021 10:38 am   Subject: dsPIC Buffered Serial TX - INT_TBE
If I remember correctly, you will find that it doesn't handle sending the
'first' character without the interrupt being explicitly triggered. What
happens instead is after a few characters are loa ...
  Topic: dsPIC Buffered Serial TX - INT_TBE
SamMeredith

Replies: 5
Views: 22616

PostForum: General CCS C Discussion   Posted: Wed Jul 07, 2021 9:10 am   Subject: dsPIC Buffered Serial TX - INT_TBE
That unfortunately, has the error, that it should only ever be used with
binary buffer sizes. Otherwise if you use a byte sized division anywhere
else in the code, you will get a warning that inte ...
  Topic: dsPIC Buffered Serial TX - INT_TBE
SamMeredith

Replies: 5
Views: 22616

PostForum: General CCS C Discussion   Posted: Wed Jul 07, 2021 2:57 am   Subject: dsPIC Buffered Serial TX - INT_TBE
I'm trying to set up buffered serial TX on a dsPIC33EP512MC806.

I initially used ex_STISR.c but found that the TBE interrupt only fires once.
I found
#include <33EP512MC806.h>

#use dela ...
  Topic: Timer not working with TCPIP stack
SamMeredith

Replies: 6
Views: 19215

PostForum: General CCS C Discussion   Posted: Tue Dec 15, 2020 7:45 am   Subject: Timer not working with TCPIP stack
My original problem is not specific to timer2, I see the same result if I use timer3/4/5.
In my actual project I use multiple timers and only noticed this behaviour on one of them (timer5 iirc).
Tha ...
  Topic: Timer not working with TCPIP stack
SamMeredith

Replies: 6
Views: 19215

PostForum: General CCS C Discussion   Posted: Tue Dec 15, 2020 5:01 am   Subject: Timer not working with TCPIP stack
Searching for the CCS functions is exactly what I had done, so that makes sense.
Does the bTimer2Enabled flag refer to timer2 as in setup_timer2() (and so should I avoid using timer2 myself?), or is ...
  Topic: Timer not working with TCPIP stack
SamMeredith

Replies: 6
Views: 19215

PostForum: General CCS C Discussion   Posted: Tue Dec 15, 2020 4:25 am   Subject: Timer not working with TCPIP stack
I can certainly understand the tick dependant timings of the stack itself not working, but why does my timer2 also not work (not used by the TCP stack)?
 
Page 1 of 2 Goto page 1, 2  Next
All times are GMT - 6 Hours
Jump to:  


Powered by phpBB © 2001, 2005 phpBB Group