PSoC™ 6 Forum Discussions
Hello,
we have some questions about the BLE stack.
Here are some details about our setup:
Chip: CY8CPROTO-063-BLE (CYBLE-416045-02)
Modus Toolbox: 3.1.0
BLE Stack: 3.8.0 (WICED/AIROC BLE)
1. In the default configuration, the BLE stack is used in dual-core mode, i.e. BLE controller on CM0p with predefined image CM0P_BLESS, BLE stack on CM4, and IPC for communication between the two CPU cores.
Is it possible to move the whole BLE functionality (BLE controller + BLE stack) to CM4 core, and use predefined image CM0P_SLEEP on CM0p?
I found some examples and documentation for using PSOC Creator and the old BLESS stack, but none for Modus Toolbox and the new WICED/AIROC BLE stack.
2. Is there a project implementation available, for building and modifying the CM0p image CM0P_BLESS on our own?
I want this IRF5803D2TRPBF. Can you tell if it's a 1039+or 2039+through screen printing?
smartconx_target@Q!w2e3r4t5y6u7i8o9p0||/t5/PSoC-6/I-purchased-this-IRF5803D2TRPBF-Can-you-tell-if-it-is-a-1039-or-2039-through/td-p/645352
Show LessIssue with using user pipe on PSoC 6
I already have the pipe set up and the endpoints registered according to CE223820 example code.
On CM0+ I call this function every 32ms:
CM4_IPC_CALLBACK_ENCODE_AUDIO is 2, which corresponds to the index of the callback function that I am calling on CM4.
Here is the definition for pT_ipcSendToCm4()
On CM4 this callback function gets called
I have a global int named i which is initialized to 0.
If I have the following code in the callback function:
I see the light on the device flashing blue and green, which is as expected, since i is incremented every time we send a message from CM0+.
However, if I have this code in the callback function:
And this code in the main loop of CM4:
The light on the device stays green and does not change, as if i is not being changed at all. I tested changing different global variables inside an ipc pipe callback function. I observed that the changes to the variable are reflected in the callback function but nowhere else within the scope of CM4.
Why is this happening? Is there something different about the IPC pipe interrupt from other interrupts? How is the memory being handles in this case?
UPDATE: I worked around this issue by declaring all of the memory on CM0 and passing pointers to CM4. So all the memory that M4 uses are statically declared on M0.
Show LessHi,
I think that the issue that I am having is similar to https://community.cypress.com/t5/PSoC-6-MCU/Unable-to-reprogram-CY8CPROTO-062-4343W/td-p/192710.
When I purchased the board, I tried quickly to see if any messages can be seen in the console, but I didn't see any. I tried only once and ignored the issue thinking that the jumpers were not in correct places, so I figured i'll ignore the issue and program the board with AWS instructions. Perhaps the board is faulty, but I don't know how to check. To this date I am still not able to see any messages on the console when booting the board.
I tried flashing with both the FreeRTOS codebase downloaded per instructions and cloning the repo from https://github.com/cypresssemiconductorco/amazon-freertos (checked out tag 202007-MTBAFR2041) and got the same results.
The project seems to build successfully (see first log below ), but I am getting errors during programming (second log).
The jumper positions are:
J14: VCC 3v3/2v5
J15: Connected
J16: 1v8
J26: Connected, after I programed the credentials.
All other jumpers are connected.
KitProg light is solid. I also updated the KitProg firmware.
dmesg log when connecting the board:
[ 2901.127425] usb 1-2: USB disconnect, device number 3
[ 2903.866592] usb 1-2: new full-speed USB device number 4 using xhci_hcd
[ 2904.116415] usb 1-2: New USB device found, idVendor=04b4, idProduct=f155, bcdDevice= 1.01
[ 2904.116425] usb 1-2: New USB device strings: Mfr=1, Product=6, SerialNumber=128
[ 2904.116432] usb 1-2: Product: KitProg3 CMSIS-DAP
[ 2904.116440] usb 1-2: Manufacturer: Cypress Semiconductor
[ 2904.116447] usb 1-2: SerialNumber: 0A110D86000E0400
[ 2904.127557] cdc_acm 1-2:1.2: ttyACM0: USB ACM device
$ grep version ~/ModusToolbox/tools_2.3/fw-loader/version.xml ~/ModusToolbox/tools_2.3/openocd/version.xml
/home/me/ModusToolbox/tools_2.3/fw-loader/version.xml:<version>3.3.0.1370</version>
/home/me/ModusToolbox/tools_2.3/openocd/version.xml:<version>4.2.0.1430</version>
cysecuretools is 3.1.0
~/ModusToolbox/tools_2.3/fw-loader/bin/fw-loader --device-list
Cypress Firmware Updater, Version: 3.3.0.1370
(C) Copyright 2018-2021 by Cypress Semiconductor Corporation (an Infineon company)
All Rights Reserved
Info: Start API initialization
Info: Connected - KitProg3 CMSIS-DAP BULK-0A110D86000E0400
Info: Hardware initialization complete 471 ms
Error: Failed to find the KP3 firmware folder: /home/me/ModusToolbox/tools_2.3/fw-loader/bin/../../kp-firmwar
Thanks,
Nik
--------------- build log ---------------
-> /me/freertos-cy8/FreeRTOS/build/cy/aws_demos/compile_commands.json
Compilation database file generation complete
Building 486 file(s)
/home/me/ModusToolbox/tools_2.3/gcc/bin/arm-none-eabi-objcopy -R .cy_sflash_user_data -R .cy_toc_part2 /me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/aws_demos.elf /me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.elf; /home/me/ModusToolbox/tools_2.3/gcc/bin/arm-none-eabi-objcopy -O ihex /me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.elf /me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.hex; cp "../../../../../vendors/cypress/MTB/psoc6/psoc64tfm/COMPONENT_TFM_S_FW/tfm_s_unsigned.hex" "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0.hex"; cysecuretools --policy "../../../../../vendors/cypress/MTB/psoc6/psoc64tfm/security/policy/policy_multi_CM0_CM4_jitp.json" --target "cy8ckit-064s0s2-4343w" sign-image --hex "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0.hex" --image-type UPGRADE --image-id 1; cysecuretools --policy "../../../../../vendors/cypress/MTB/psoc6/psoc64tfm/security/policy/policy_multi_CM0_CM4_jitp.json" --target "cy8ckit-064s0s2-4343w" sign-image --hex "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.hex" --image-type UPGRADE --image-id 16; cp "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0_unsigned.hex" "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0.hex"; cp "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4_unsigned.hex" "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.hex"; cysecuretools --policy "../../../../../vendors/cypress/MTB/psoc6/psoc64tfm/security/policy/policy_multi_CM0_CM4_jitp.json" --target "cy8ckit-064s0s2-4343w" sign-image --hex "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0.hex" --image-type BOOT --image-id 1; cysecuretools --policy "../../../../../vendors/cypress/MTB/psoc6/psoc64tfm/security/policy/policy_multi_CM0_CM4_jitp.json" --target "cy8ckit-064s0s2-4343w" sign-image --hex "/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.hex" --image-type BOOT --image-id 16;
2021-10-13 10:49:55,951 : C : WARN : There is gap between regions 269926400:270254080 and 270303232:270336000 (49152 bytes)
2021-10-13 10:49:55,952 : C : WARN : Policy validation finished with warnings
2021-10-13 10:49:57,292 : C : INFO : Image for slot UPGRADE signed successfully! (/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0_upgrade.hex)
2021-10-13 10:49:59,551 : C : WARN : There is gap between regions 269926400:270254080 and 270303232:270336000 (49152 bytes)
2021-10-13 10:49:59,553 : C : WARN : Policy validation finished with warnings
2021-10-13 10:50:04,950 : C : INFO : Image for slot UPGRADE signed successfully! (/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4_upgrade.hex)
2021-10-13 10:50:10,284 : C : WARN : There is gap between regions 269926400:270254080 and 270303232:270336000 (49152 bytes)
2021-10-13 10:50:10,285 : C : WARN : Policy validation finished with warnings
2021-10-13 10:50:11,196 : C : INFO : Image for slot BOOT signed successfully! (/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm0.hex)
2021-10-13 10:50:12,303 : C : WARN : There is gap between regions 269926400:270254080 and 270303232:270336000 (49152 bytes)
2021-10-13 10:50:12,303 : C : WARN : Policy validation finished with warnings
2021-10-13 10:50:15,737 : C : INFO : Image for slot BOOT signed successfully! (/me/freertos-cy8/FreeRTOS/build/cy/aws_demos/CY8CKIT_064S0S2_4343W/Debug/cm4.hex)
==============================================================================
= Build complete =
==============================================================================
Calculating memory consumption: CYB0644ABZI-S2D44 GCC_ARM -Og
----------------------------------------------------
| Section Name | Address | Size |
----------------------------------------------------
| .text | 0x10050400 | 825040 |
| .ARM.exidx | 0x10119ad0 | 8 |
| .copy.table | 0x10119ad8 | 24 |
| .zero.table | 0x10119af0 | 8 |
| .data | 0x080302e0 | 2328 |
| .cy_sharedmem | 0x08030bf8 | 8 |
| tasks_share | 0x08030c00 | 32 |
| .noinit | 0x08030c20 | 148 |
| .bss | 0x08030cb4 | 53524 |
| .heap | 0x0803ddc8 | 688696 |
----------------------------------------------------
Total Internal Flash (Available) 1899520
Total Internal Flash (Utilized) 828480
Total Internal SRAM (Available) 1046528
Total Internal SRAM (Utilized with heap) 744736
--------------- program log ---------------
Open On-Chip Debugger 0.10.0+dev-4.2.0.1430 (2021-03-05-16:30)
Licensed under GNU GPL v2
For bug reports, read
http://openocd.org/doc/doxygen/bugs.html
** Main Flash size limited to 0x1D0000 bytes
adapter speed: 2000 kHz
adapter srst delay: 0
adapter srst pulse_width: 5
Info : auto-selecting first available session transport "swd". To override use 'transport select <transport>'.
** Using POWERUP_DELAY: 5000 ms
** Using TARGET_AP: cm0_ap
** Using ACQUIRE_TIMEOUT: 15000 ms
Info : Using CMSIS loader 'CY8C6xxA_SMIF_S25FL512S' for bank 'psoc64_smif_cm0' (footprint 11532 bytes)
srst_only separate srst_gates_jtag srst_open_drain connect_deassert_srst
Info : CMSIS-DAP: SWD Supported
Info : CMSIS-DAP: FW Version = 2.0.0
Info : CMSIS-DAP: Interface Initialised (SWD)
Info : SWCLK/TCK = 1 SWDIO/TMS = 1 TDI = 0 TDO = 0 nTRST = 0 nRESET = 1
Info : CMSIS-DAP: Interface ready
Info : KitProg3: FW version: 2.30.1155
Info : KitProg3: Pipelined transfers enabled
Info : VTarget = 2.719 V
Info : clock speed 2000 kHz
Info : SWD DPIDR 0x6ba02477
Info : Power dropout detected, running power_dropout proc.
** Waiting for target to boot (5000 ms), use 'set POWERUP_DELAY' to override
Info : Voltage is stable for more than 5 sec, assuming power is good
***************************************
** Use overriden Main Flash size, kb: 1856
Info : Power dropout detected, running power_dropout proc.
** Waiting for target to boot (5000 ms), use 'set POWERUP_DELAY' to override
** Silicon: 0xE4A0, Family: 0x102, Rev.: 0x12 (A1)
Info : Power dropout detected, running power_dropout proc.
** Waiting for target to boot (5000 ms), use 'set POWERUP_DELAY' to override
** Detected Device: CYS0644ABZI-S2D44
** Flash Boot version: 4.0.2.1842
** SFlash version: 310192
Sensed power restore, running reset init and halting GDB.
***************************************
** Use overriden Main Flash size, kb: 1856
** Silicon: 0xE4A0, Family: 0x102, Rev.: 0x12 (A1)
** Detected Device: CYS0644ABZI-S2D44
Info : SWD DPIDR 0x6ba02477
Error: Failed to read memory at 0x16002008
***************************************
Info : Deferring arp_examine of psoc64.cpu.cm0
Info : Use arp_examine command to examine it manually!
Error: mem2array: Read @ 0x16002004, w=4, cnt=1, failed
Error: Invalid FlashBoot: High version word of Flash Boot is zero
Info : SWD DPIDR 0x6ba02477
Info : Waiting up to 15.0 sec for the bootloader to open AP #1...
Error: AP #1 is still not opened: Failed to access debug sybsystem, giving up
Error executing event reset-deassert-post on target psoc64.cpu.cm0:
/home/me/ModusToolbox/tools_2.3/openocd/bin/../scripts/mem_helper.tcl:6: Error:
in procedure 'program'
in procedure 'show_device_info' called at file "/home/me/ModusToolbox/tools_2.3/openocd/bin/../scripts/target/mxs40/psoc6_secure_common.cfg", line 245
in procedure 'power_restore'
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 279
in procedure 'mrw' called at file "/home/me/ModusToolbox/tools_2.3/openocd/bin/../scripts/target/mxs40/cy_get_set_device_param.cfg", line 38
at file "/home/me/ModusToolbox/tools_2.3/openocd/bin/../scripts/mem_helper.tcl", line 6
TARGET: psoc64.cpu.cm0 - Not halted
in procedure 'program'
in procedure 'show_device_info' called at file "/home/me/ModusToolbox/tools_2.3/openocd/bin/../scripts/target/mxs40/psoc6_secure_common.cfg", line 245
in procedure 'power_restore'
Info : SWD DPIDR 0x6ba02477
Polling target psoc64.cpu.cm0 failed, trying to reexamine
Info : SWD DPIDR 0x6ba02477
Info : SWD DPIDR 0x6ba02477
Error: Failed to read memory at 0xe000ed00
Examination failed, GDB will be halted. Polling again in 100ms
***************************************
Polling target psoc64.cpu.cm0 failed, trying to reexamine
Info : SWD DPIDR 0x6ba02477
Info : SWD DPIDR 0x6ba02477
Error: Failed to read memory at 0xe000ed00
Examination failed, GDB will be halted. Polling again in 300ms
Info : starting gdb server for psoc64.cpu.cm0 on 3333
Info : Listening on port 3333 for gdb connections
Info : Deferring arp_examine of psoc64.cpu.cm0
Info : Use arp_examine command to examine it manually!
Info : SWD DPIDR 0x6ba02477
Info : Waiting up to 15.0 sec for the bootloader to open AP #1...
Error: AP #1 is still not opened: Failed to access debug sybsystem, giving up
Error executing event reset-deassert-post on target psoc64.cpu.cm0:
embedded:startup.tcl:279: Error:
in procedure 'program'
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 279
TARGET: psoc64.cpu.cm0 - Not halted
in procedure 'program'
** CM0 Program operation failed **
Info : SWD DPIDR 0x6ba02477
Polling target psoc64.cpu.cm0 failed, trying to reexamine
Info : SWD DPIDR 0x6ba02477
Info : SWD DPIDR 0x6ba02477
Error: Failed to read memory at 0xe000ed00
Examination failed, GDB will be halted. Polling again in 700ms
Info : Deferring arp_examine of psoc64.cpu.cm0
Info : Use arp_examine command to examine it manually!
Info : SWD DPIDR 0x6ba02477
Info : Waiting up to 15.0 sec for the bootloader to open AP #1...
Error: AP #1 is still not opened: Failed to access debug sybsystem, giving up
Error executing event reset-deassert-post on target psoc64.cpu.cm0:
embedded:startup.tcl:526: Error:
in procedure 'program'
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 279
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 563
at file "embedded:startup.tcl", line 526
TARGET: psoc64.cpu.cm0 - Not halted
in procedure 'program'
** CM4 Program operation failed **
Info : SWD DPIDR 0x6ba02477
Info : Deferring arp_examine of psoc64.cpu.cm0
Info : Use arp_examine command to examine it manually!
Info : SWD DPIDR 0x6ba02477
Info : Waiting up to 15.0 sec for the bootloader to open AP #1...
Error: AP #1 is still not opened: Failed to access debug sybsystem, giving up
Error executing event reset-deassert-post on target psoc64.cpu.cm0:
embedded:startup.tcl:526: Error:
in procedure 'ocd_process_reset'
in procedure 'ocd_process_reset_inner' called at file "embedded:startup.tcl", line 279
in procedure 'program'
in procedure 'program_error' called at file "embedded:startup.tcl", line 563
at file "embedded:startup.tcl", line 526
Info : psoc64.dap: powering down debug domain...
Show Less
We have discovered a problem with the lwip library in ModusToolbox 2.0, 2.1, 2.2 and 2.3. It occurs when creating a new Wi-Fi project or updating the lwip library in an existing project. The problem is reported as a fatal error.
fatal: unable to access 'https://git.savannah.nongnu.org/git/lwip/': SSL certificate problem: certificate has expired
There is a defect in versions of OpenSSL prior to 1.1.0 which, as of September 30, causes web accesses with the Let's Encrypt intermediate certificate (Let's Encrypt R3) to fail. Let's Encrypt R3 contains signatures from two roots: DST Root CA X3 and ISRG Root X1. As explained by Let’s Encrypt (DST Root CA X3 Expiration), the former certificate has expired but the latter remains trusted. The defective versions of OpenSSL require both certificates to be trusted and erroneously deny the access.
OpenSSL 1.1.0 is used by the modus-shell utility on Windows hosts in all versions of ModusToolbox. The soon-to-be released ModusToolbox 2.4 shall include a newer version of OpenSSL to correct the problem.
To safely and reliably access lwip from ModusToolbox 2.3 and earlier, follow these steps to remove the expired certificate.
- Open the file ~\ModusToolbox\tools_2.x\modus-shell\etc\pki\ca-trust\extracted\pem\tls-ca-bundle.pem in a text editor
- Search for the line beginning with the comment "# DST Root CA X3"
- Delete that line and the associated certificate - including the "-----BEGIN CERTIFICATE-----" and "-----END CERTIFICATE-----" lines.
The Open Documentation Team is looking for a few great beta testers. People interested in a single place to find their documentation and a place where it will be updated on their feedback. The Cypress Community has always been a place of collaboration with you, our users, and we’d like to extend an invitation to give us feedback on this new platform between now and January 10th, 2021.
The first documentation platform we’re opening is for PSoC 6 and AnyCloud customers and offers all the documentation you, the developers, need in one place. The Open Documentation platform allows users to find all the development documentation in one place, complete with real-time updates from our software and support teams based on inputs and questions from our developer community. This creates a responsive, easier to use platform for you to find everything throughout your development process.
This platform will host the latest version of the documentation along with continuous updates from our support organization based on questions from you, our Community members. We look forward to hearing your feedback on this beta PSoC 6 and AnyCloud book and collaborating with you on better documentation going forward.
Jump over and test out the PSoC 6 and AnyCloud platform here.
Let us know here what you think of the platform. Test out the in-documentation feedback tool too. We’d love to hear any other documentation books you would like us to build.
Thank you for being a part of our commitment to continually improving our developer experience! I appreciate your help in making this the best tool we can.
Thank you,
Robyn Weil
Digital Technologies Team
Show LessTo all,
I have place a Windows PC terminal source code in C# on the Code sharing forum.
PC Terminal Program with C# Source Code
Enjoy,
Len
Show Less