Device Resources

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

cross mob
Anonymous
Not applicable

We share the same source code over several different PSoC devices (PSoC 3 and PSoC 5) and  use a varying amount of features. For some debug functions, I would like to test (precompiler - #ifdef) if in the current project a given resource is available. For instance, whether Port3 or Port 5 exists (on the package of course, I understand that the registers and hardware might be even there, just not externally connected), would be useful to a debugging tool that displays the status of each port.

   

cydevice.h and cypins.h define all the registers, I have checked also in designs that use a package where those pins don't exist.

   

I think the fitter must have a knowledge base for each device/package?

   

There is CYDEV_SRAM_SIZE and CYDEV_EE_SIZE, so for some resources the software can find the sizes.

   

But for instance,

   

CYDEV_IO_PC_PRT5_SIZE 0x00000008u

   

for a CY8C3866LTI-067, the 48 pin QFP package, that does not have port 5.

   

Andreas

0 Likes
4 Replies