PSoC™ 6 Forum Discussions
Hello,
I have this development kit CY8CKIT-062-WIF-BT. I can program and debug in Modus toolbox just fine. I want to follow the BLE tutorials in PSoC Creator. When I try to program the device, the board does not show up as a target to select.
I have updated the board to kitprog3.
Show Less
Using the https://github.com/Infineon/mtb-example-wifi-mqtt-client demo project with a CY8CKIT-062S2-43012, after publishing to the client, the client stops sending a PINGREQ to the MQTT broker and the broker will send a disconnect when the client exceeds the KEEPALIVE timeout.
The expected behavior would be to keep the connection with the broker alive regardless of how often the client is published to or what is being published.
I am migrating a project to v4.0.0 of the Anycloud MQTT Client (this started before v5.0.0 was release) and I first noticed this behavior when I added a simple hardware timer that had nothing to do with MQTT. In that investigation I found that the FreeRTOS timer for the KEEPALIVE ping request fails, the client fails to ping, and the MQTT broker sends a disconnect message when the timeout is exceeded.
To repeat the issue:
This is on version 4.0.0 of the demo code, using version 2.4 of ModusToolbox, and a un-secure connection to a Mosquitto broker on my network running on an Ubuntu v20 box. The broker is set up with both secure and un-secure connections and I have noticed the failure to send a PINGREQ with both. An un-secure connection allows easy verification via Wireshark.
- Clone and checkout v4.0.0 of https://github.com/Infineon/mtb-example-wifi-mqtt-client
- Run “make modlibs” and switch the BSP to CY8CKIT-062S2-43012
- Change WiFi config to match my network
- Update MQTT broker to local network address, the port to 1883, turn off MQTT_SECURE_CONNECTION, and change MQTT_KEEP_ALIVE_SECONDS to 5. (Changing the keep alive to five seconds will reveal issue faster.)
- Not necessary, but it cleans the UART output - comment out lines 262-276 in source/subscriber_task.c in the mqtt_subscription_callback() function.
Once programmed, running, and connected, publish to the device with mosquitto_pub: mosquitto_pub -h 192.168.1.5 -t "ledstatus" -m "0123456"
The message "0123456" does not mean anything to the client as the processing of it is commented out -- I just want to see the connection work. The message gets through, but the client no longer sends a PINGREQ and the MQTT broker disconnects.
I've attached the output of the client and the relevant portion of Mosquitto broker log. Notice that the first client id is psoc6-mqtt-client8847 and after reconnecting, the id is psoc6-mqtt-client21675 which is reflected in both logs. I would've attached text files, but they are not allowed.
From the Wireshark capture, you can see that the broker closes the socket at the 13.712 s mark. This is roughly 7.5 seconds after the last PINGREQ from the client at the 6.138 s mark. 7.57 s is about 1.5 the keep alive time of five seconds set above.
Any help would be appreciated,
Matt
Show Less
Hi all,
I've a little question about the way UART works on PSOC6.
My project is on ModusToolBox and I use only low level API for UART (smartcard mode) (Cy_SCB_UART_Put() / Cy_SCB_UART_Get()).
Each time i send a byte, i have the echo and need to read this bytes to empty rx fifo.
Is it normal ? is it possible to avoid this ?
Thank you for your support,
Regards
Show LessDear Receiver,
I would like to learn PSoC 61 MCU but I can't find any demo kits which is based on PSoC 61 MCU.
Most of kits are based on PSOC 62 or PSoC 63.
Is any demo kit based on PSoC 61 MCU ?!
Thank you so much.
Show LessHello,
I designed a PCB around the CY8C614AAZI-S2F44 which uses USB to talk to a host. As far as I'm aware, this device is not yet supported by PSOC Creator so I've had to use the HAL API directly. The USBDP and USBDM pins on the type-B connector are connected to pins 14_0 and 14_1 respectively. I've hooked the PCB up to my computer to try to communicate and I have an oscilloscope probe between USBDP and ground.
To initialize the peripheral, I tried every combination of the following:
- Enabling the USB peripheral in the device configurator in modus toolbox
- Copying the initialization snippet in the HAL documentation
- Just calling cyhal_usb_dev_connect() without calling cyhal_usb_dev_init()
When I call the initialization function, it returns an error code and the PSOC gets stuck in an infinite loop. It seems that When I set the USB config in the Device Configurator and only call the cyhal_usb_dev_connect(), some fault occurs and I also get stuck in an infinite loop. In neither case do I see any activity on the USBDP line.
What am I doing wrong?
Best
Sam Shersher
Show LessHi,
I am working on a PSoC6 BLE project using the CYBLE-416045-02 module and PSoC Creator V4.4. The BLE is running in Central mode and connects to four Peripheral devices. The peripheral devices implement custom services and characteristics that supply data to the Central using Notifications These peripheral devices are pre-existing and are based on PSoC 4 devices – I have all the definition information for these custom services and characteristics that they implement.
I have the basic PSoC6 Central device working in that I can discover the Peripheral devices and connect to them. However, I am struggling to understand how to implement the Client code to both read from the peripherals, and to respond to notifications from the peripherals. I can find many code examples for Server implementations, but very few for Client implementations.
Reading SIG Standard Service Characteristics
The API includes functions for reading characteristics of the SIG services, for example Cy_BLE_BASC_GetCharacteristicValue. These functions have a parameter of type cy_stc_ble_conn_handle_t which is a struct with a member called attId. The documentation says that this member “Identifies the active ATT connection Instance.” I cannot find any more information about this member.
Please would you tell me what this “active ATT connection Instance” is and how I can get its value to use in setting this struct member?
Reading Custom Service Characteristics
I cannot find any example of doing this on the Client side. I see in the API documentation that there is a function called Cy_BLE_GATTC_ReadCharacteristicValue – is this the function that should be used for reading custom characteristics? Please would you explain the detail of reading custom characteristics?
Responding to Notifications Received by Client
Once I have established a connection to a Peripheral, I see that the Central starts to receive CY_BLE_EVT_GATTC_HANDLE_VALUE_NTF events. I assume that this is because of the notifications produced by the Peripheral. I see that this event’s parameter is of type cy_stc_ble_gattc_handle_value_ntf_param_t, but I cannot find any definition of this type in the documentation. It seems to be an alias for cy_stc_ble_gatt_write_param_t, which is described as a write parameter, not a read parameter, so I am confused.
Please can you explain to me how to correctly extract the data in the notification, and how to respond to the BLE stack that the notification has been received?
If you can point me to any examples would help with these questions, that would be much appreciated.
Thanks in advance for your help.
Kind regards,
Peter
Show LessHi ,
I converted a custom modustoolbox 2.4 dual-core empty design which worked to a modus toolbox v3 . the system uses an external TCXO 48 MHz with 2.5 ppm for stability over temperature and the tolerances required for USB which in modus 2.4 was not achievable with the internal 8mhz IMO , both cores running at 100mhz and pll setup for USB .
test one
to see if the system still performs good the device configurator is used to set the clocks first to the IMO 8Mhz, kept the rest of the clocks the same, and the LEDs in both cores functioned as expected
test two
Changed from the internal IMO to the External 48 Mhz TCXO and kept the rest the same . I set up the P0.0 as a digital input , impedance high as stipulated but the HW design guide . WCO is disabled and the low clock frequencies are set to the ILO clocks
Code compiles fine but uploadeing to the device is get an DP initialization failure , from my search on the WEB this seems to indicate a SWJ block . However I don't think this is the case here because if I change the clocks back to the internal IMO clock this goes away and the device can be programmed. It points to the potential problem of the external clock .
the Scope shows the clock is oscillating at the correct frequency , which makes me wonder what else needs to be done for this to be able to work from the TCXO .
Attached is the screen grabs and the software .
Any advise here for the use of the external TCXO
Regards
C
Show Less
Title says it all.
Hello,
I am using cy8c6136.
I am using the modified basic DFU bootloader project by me.
I write the bootloader.hex file into the blank state MCU and dfus APP1 using dfuh-tool.
There’s no problem here.
But, in a specific situation (button input and using enterDFU() ) in APP1, the bootloader does not run.
APP1 seems to be executed immediately without going through bootloader.
The reason is that there is no port output(about 5 Sec) in the bootloader main() inserted by me.
APP1 is an IAR project, and the *.icf file has been modified.
I attach the bootloader project and APP1 config file.
The common_ram part is for determining whether the bootloader proceeds DFU.
I would like some help on which part is the problem.
Thank you.
#define BOOTLOADER_ID (0u) // App ID of bootloader
void enterDFU(void)
{
dbg("DFU mode start!!!");
common_ram->validMark = COMMON_RAM_VALIDT_MARK;
common_ram->dfuMark = DFU_START_MARK;
common_ram->dfuState = 0;
common_ram->dfuStatus = 0;
Cy_DFU_ExecuteApp(BOOTLOADER_ID);
// CySoftwareReset();
}
Show LessI need to find an external RAM compatible with CY8C6247BZI-D44 that is:
1. At least 16MB
2. Has QSPI or Octal SPI
3. Works with 3.3V supply
Thank you in advance for your help.
Show Less