PSoC™ 6 Forum Discussions
text.format{('custom.tabs.no.results')}
I'm running a PSOC6 system with BLE and RTOS. I am trying to get the BLE stack to stop advertising. It seemed like a simple call to Cy_BLE_GAPP_StopAdvertisement should do the trick:
// Stop BLE advertising.
Cy_BLE_GAPP_StopAdvertisement();
cy_en_ble_adv_state_t advertisingState;
while( Cy_BLE_GetAdvertisementState() != CY_BLE_ADV_STATE_STOPPED )
{
advertisingState = Cy_BLE_GetAdvertisementState();
vTaskDelay(25);
}
But... the system stays stuck in the CY_BLE_ADV_STATE_STOP_INITIATED state AND the BLE stack doesn't stop advertising, either. I drilled down into Cy_BLE_GAPP_StopAdvertisement() and found that it called Cy_BLE_GAPP_ExitDiscoveryMode(), which sounded like the function that should do the heavy lifting. But the only definition I could find for that function in my generated source code is shown below. And THAT function sure seems to be missing any active code.
So, have I just missed an option in the BLE component that I need to check? Do I have a bad version? Any help would be appreciated.
Ed H.
/******************************************************************************
* Function Name: Cy_BLE_GAPP_ExitDiscoveryMode
***************************************************************************//**
*
* This function is used by the GAP Peripheral application to stop the advertisement.
* This is a non-blocking function.
*
* On stopping the advertisement, GAP Peripheral application receives
* CY_BLE_EVT_GAPP_ADVERTISEMENT_START_STOP event.
*
* \note
* CY_BLE_EVT_GAPP_ADVERTISEMENT_START_STOP event is generated for calling Cy_BLE_GAPP_EnterDiscoveryMode and
* Cy_BLE_GAPP_ExitDiscoveryMode APIs. Application should keep track of which function
* resulted in this event.
*
* \return
* cy_en_ble_api_result_t : Return value indicates whether the function succeeded or
* failed. Following are the possible error codes.
*
* Errors codes | Description
* ------------ | -----------
* CY_BLE_SUCCESS | On successful operation.
* CY_BLE_ERROR_MEMORY_ALLOCATION_FAILED | Memory allocation failed.
* CY_BLE_ERROR_INSUFFICIENT_RESOURCES | BLE Stack resources are unavailable.
*
******************************************************************************/
cy_en_ble_api_result_t Cy_BLE_GAPP_ExitDiscoveryMode
(
void
);
Show LessNeither PSoC Creator 4.3 nor ModusToolbox 2.2 appears to support PSoCs with more than 9 SCBs.
There is at least one part in production that has 13 SCBs, 9 of which can be configured as UARTs.
CY8C6248AZI-S2D14 appears to be in production. Datasheet @ https://www.cypress.com/part/cy8c6248azi-s2d14
13 run-time configurable serial communication blocks (SCBs)
- Eight SCBs: configurable as SPI, I2C, or UART
- Four SCBs: configurable as I2C or UART
- One Deep Sleep SCB: configurable as SPI or I2C
What is the process to design in 9 UARTs or more than 9 SCBs?
Greg
Show LessWhen I execute following command I get an error. See attached log. The init and create-keys commands worked as expected.
cysecuretools --target CY8CKIT-064B0S2-4343W --policy ./policy/ policy_single_CM0_CM4.json provision-device
Show LessI am using VDDD=3.3V, VDDIO0,VDDIO1,VDDA=1.8V, 1.1V LDO internal regulator, no external crystals and the deep sleep current is 15uA higher than in hibernate mode on my custom board. I am retaining all RAM. According to the datasheet deep sleep current IDD33B_B is 9uA and hibernate current IDD34A is 800nA so the difference should be 8uA. Why is there a 7uA difference between the spec and the measurements? I am entering deep sleep and hibernate with these functions:
Cy_SysPm_DeepSleep(CY_SYSPM_WAIT_FOR_INTERRUPT);
Cy_SysPm_Hibernate();
Show LessIf you wish to use and SDCard with PSOC6, take a look at the following link: http://elm-chan.org/fsw/ff/00index_e.html
We are successfully using this code. If an error occurs, you can handle there in the code, rather than having to patch into an exception vector.
This code can also be used in other ways, say and EMMC via direct memory or SPI or other interface.
This is fully open source, and can be used freely, the license is as follows:
/*----------------------------------------------------------------------------/
/ FatFs - Generic FAT Filesystem Module Rx.xx /
/-----------------------------------------------------------------------------/
/
/ Copyright (C) 20xx, ChaN, all right reserved.
/
/ FatFs module is an open source software. Redistribution and use of FatFs in
/ source and binary forms, with or without modification, are permitted provided
/ that the following condition is met:
/
/ 1. Redistributions of source code must retain the above copyright notice,
/ this condition and the following disclaimer.
/
/ This software is provided by the copyright holder and contributors "AS IS"
/ and any warranties related to this software are DISCLAIMED.
/ The copyright owner or contributors be NOT LIABLE for any damages caused
/ by use of this software.
/----------------------------------------------------------------------------*/
Also take a look at PSOC5 and SDCARD, warning regarding pins close together on PSOC 5 (may not be an issue on PSOC6).
Show LessI have an application that has some I2C communication in it that I am setting up to be an app in a bootloadable project.
Everything works before I set it up as an app.
Going close to CE213903 set up for a basic dfu, I added DFU_SDK Core in build settings, and then set up the dfu_cm0p.ld and dfu_cm4p.ld.
It will compile and run fine, and I can do UART communication and blink an LED no problem. I can also switch between app 0 and app 1 great.
But when I try to send over I2C in either app it will get stuck on Cy_SysLib_ExitCriticalSection(intrState) in mae_i2c_write_byte() -> mae_i2c_write() in mae_i2c.c ->Cy_SCB_I2C_MasterWrite() -> Cy_SCB_I2C_MasterWrite() in cy_scb_i2c.c -> Cy_SysLib_ExitCriticalSection(intrState) in cy_scb_i2c.c.
Any ideas what could be causing the dfu stuff to interfere with I2C?
Using part CY8C6347BZI-BLD54
Show LessHas anyone ever used the Unit Module Testing tool Tessy with PSoc Creator and PSOC 6. We are trying but haven't be able to configure things correctly yet.
Has any used any other UMT tools successfully?
Show LessHi,
I try to use the DFU-UART with a PSOC61 with one CM4 core.
But it did not work. Compiling and burning is working without error, but debugging is not possible.
I think it is because of the Linker File dfu_cm4.ld
Here are definition of Core0 and Core1, but the PSOC61 just have one core.
I use PSCO Creator 4.3 with PDL 3.1.2 (I tried with all available PDL Version from 3.0.1 on)
Is there a solution for this problem?
I was succesful with a PSOC63 already. So with a dual core it works without problem.
best regards,
Mike
Show LessFollowing the instructions here: Generate Combined Hex File for PSoC 6 MCU Basic Device Firmware Update - KBA227138
Generate Combined Hex File for PSoC 6 MCU Basic Device Firmware Update - KBA227138
I get this error when I try to build app1(step 4):
'.\CortexM4\ARM_GCC_541\Debug\PSoC6DfuBasicApp101_merged.elf' is not recognized as an internal or external command,
operable program or batch file.
This comes up when I add these lines to post_build_core1.bat:
@rem Merges App0 and App1 into a single hex file for easier programming
%CY_MCU_ELF_TOOL% -M %OUTPUT_DIR%\%PRJ_NAME%%ELF_EXT% ..\App0%ELF_EXT% --output
%OUTPUT_DIR%\%PRJ_NAME%_merged%ELF_EXT% --hex %OUTPUT_DIR%\%PRJ_NAME%.hex
I don't understand how the .bat file works... From the error it looks like it is trying to run PSoC6DfuBasicApp101_merged.elf as a command even though it is just a file.
Any ideas how to get these lines working?
I started with the example projects PSoC6DfuBasicApp0Uart01, and PSoC6DfuBasicApp101 for app0 and app1.
Show LessI have been using Cy_SysLib_Delay() to wait. In my effort to use more MBedOS calls, I found wait_ms. In trying to use it, I've found some sort of conflict between wait_ms and us_ticker_read. Also, I found in the wait documentation on MBedOS that the wait family of functions prevents deep sleep from occurring. An alternative would be to split up my code and then use LowPowerTimeout that would call another function to continue operation.
What is the correct way to wait? Is there a way to wait that allows the processor to enter deep sleep mode?
EDIT: I'm using MBedOS 5.12
Show Less