PSoC™ Creator & Designer Forum Discussions
Hi,
I have several devices that share the exact same source code and generated files, all of them use CAN communication with full CAN mailboxes and specific IDs (TX and RX), differing only in their ID numbers. Is there a way to set the IDs from code while maintaining the rest of the CAN configuration (mailboxes names, identifiers, etc) intact? This would help me program each one using only one project, by changing a flag or some other configuration file, instead of having to create a whole project for every device.
Best Regards,
Rodrigo
Show LessWhen using GraphicLCDIntf (e.g. in Ce222221_Voice_Recorder example) changing GraphicLCDIntf from v.1.0 to v.1.80 causes errors:
undefined reference to `Cy_GPIO_Clr',
undefined reference to `Cy_GPIO_Set'
so, using Pins became inavailable.
At the first glance I could not find what is the reason.
Generated API files are the same.
Show LessSafety / regulations | |
We are in the progress of conceptualization a design for an implantable medical device which will probably have some class-C software pieces. I am wondering if the PSoC devices fit into this. - Are there any Cypress customers who have used a PSoC devices within implantable medical devices? - Is the programmable HW classified as software or as HW? E.g. can we take safety measures using the PSoC HW, in other words, does the programmable HW falls outside the software scope? - Is their any documentation available that gives some more inside whether or not it is feasible to use a Cypress PSoC devices within a medical implantable device. |
I am looking to improve my FreeRTOS Command Line Interface service. First a little background:
- My device is a composite USB device with a CDC/UART to which I have added two endpoints which service a HID device.
- The CLI engine is the FreeRTOS package available from Amazon under MIT terms - in other words the latest FreeRTOS 10 shell.
- The USB CDC is the virtual UART to which the CLI is attached and is used with a user's terminal emulator connected to the appropriate COM port.
- The application is really the HID, the CDC UART is just to provide a console for development.
- The present configuration has the FreeRTOS task which processes the CLI continuously checking USBUART_DataIsReady() and being preempted by higher priority tasks.
I would like to create a FreeRTOS semaphore to hold off the foreground CLI task. I do not care that the semaphore is 100% accurate, by this I mean if there is a callback which sometime indicates data could be ready and sometime does not (like perhaps a callback that just indicates something took place on the USB interface) I am OK with that - I can still have the foreground check that data is available with USBUART_DataIsReady() even when the foreground gets the semaphore.
The USBFS_DispatchCDCClass_CDC_WRITE_REQUESTS_Callback does not seem to do what I want. There is little documentation on what I am supposed to do, I can't find an example and the documentation that says "This callback function has to return USBFS_TRUE if request is recognized and handled and USBFS_FALSE otherwise." which implies to me I need to write code to handle data at a lower level that I want if I use this callback. If this is the appropriate place to release a semaphore, could I get a little help to know when I return USBS_TRUE and when I don't?
Would USBFS_EP_3_ISR_ExitCallback be a better place to release a semaphore to the foreground? Endpoint 3 is I believe the output from the host / input to the PSOC for my configuration.
Show LessI would like to use the pre-baked SerialNVRAM component because it seems like the only way to put an FRAM and other SPI devices on the same bus.
I've seem there is similar here http://www.cypress.com/documentation/application-notes/an89659-interfacing-spi-f-ram-psoc-4 , but it won't share the SPI.
The SerialNVRAM datasheet suggests using SPI in SCB mode, but I have to use UDB since the fixed pins are not available. Creator does the Generate Application step, but when compiling fails because "SPIM_SPI_UART.h" is missing and not generated. Is this because of the SCB mode?
Show LessHello, I'm following video-lesson 5. After placing the flip-flop and the logical "1" and building the project, I get the following error: "Pin guidance unavailable: Resource limit: Maximum number of Macrocells exceeded (max=0, needed=1).". Can someone help me out?
Show LessI apologize for being a bit of a newb. C is not my strongest language and it's way of doing arrays is a bit foreign to me. I was hoping somebody could help me with figuring out how to implement a UART RX receiving function for fetching packets being sent from another dev board to my PSoC 5LP board. They gave examples of TX and RX functions. I understood TX but having trouble figuring out the RX. They gave:
int recv_packet(char *p, int len){
char c;
int received = 0;
/* sit in a loop reading bytes until we put together
* a whole packet.
* Make sure not to copy them into the packet if we
* run out of room.
*/
while(1) {
/* get a character to process
*/
c = UART_GetChar();
/* handle bytestuffing if necessary
*/
switch(c) {
/* if it's an END character then we're done with
* the packet
*/
case END:
/* a minor optimization: if there is no
* data in the packet, ignore it. This is
* meant to avoid bothering IP with all
* the empty packets generated by the
* duplicate END characters which are in
* turn sent to try to detect line noise.
*/
if(received)
return received;
else
break;
/* if it's the same code as an ESC character, wait
* and get another character and then figure out
* what to store in the packet based on that.
*/
case ESC:
c = UART_GetChar();
/* if "c" is not one of these two, then we
* have a protocol violation. The best bet
* seems to be to leave the byte alone and
* just stuff it into the packet
*/
switch(c) {
case ESC_END:
c = END;
break;
case ESC_ESC:
c = ESC;
break;
}
/* here we fall into the default handler and let
* it store the character for us
*/
default:
if(received < len)
p[received++] = c;
}
}
}
So first question: The comments they gave are helpful but I'm having trouble with the while loop. Is the return in the first case (for END) going to end the while loop? I've never seen a while loop use a (1) instead of some variable.
Second question: How do I use this function effectively? With fiddling with the TX function I've understood that arrays need to have a declared length in C but how would I essentialy make the array dynamically resized to be the size of the packet received?
Show LessI'm going to cross post this here ... I am looking for *ANY* way to output some debug text and variables to the Output Tab in the IDE (or any tab!) while debugging my custom PCB and code.
In most all of the other IDEs that I use, there is always a "console.log" kind of functionality that I can use to simply dump some data to the IDE while debugging in the IDE.
How can I get some sort of output like that into the IDE?
I have seen all sorts of people talking about having to create a UART and output off pins in the board ... but what if I don't have the pins to do that? How can I get some form of logging going in the IDE?
There has to be some way ... right? Please? 🙂
Show LessDear all,
any suggestion on how I could configure SPI in Creator to send serial data to chips like led drivers
which don't have a dedicated clock line but utilise a NZR signal with tight timing constraints. these are found increasingly in cheaper addressable led strips than those with Data/Clock serial drivers.
I am using the PSoC 4 BLE mcu.
Regards
Fausto
Show Less