PSoC™ Creator & Designer Forum Discussions
I want to use a Kit-059 to control a 16x16 cross-point switch Analog Devices AD75019, using the SPI master component. The AD75019 takes 256 bits of serial data clocked in a CPHA= 0, CPOL=0 format.
I am examining SPIM_Example Project 1.10 to get an understanding of using am SPI as a master. I am also looking at documentation component data sheets Serial Peripheral Interface (SPI) Master 2.50, Direct Memory Access 1.70, ap notes AN52705 and AN84810, and the data sheet for the AD75019.
questions:
1) this section of the example main.c:
/* DMA Configuration for DMA_TX */
#define DMA_TX_BYTES_PER_BURST (1u)
#define DMA_TX_REQUEST_PER_BURST (1u)
#define DMA_TX_SRC_BASE (CYDEV_SRAM_BASE)
#define DMA_TX_DST_BASE (CYDEV_PERIPH_BASE)
The four DMA... are used in the DMA transmit configuration. I take it that 1u means 1 byte, unsigned integer.
Where are CYDEV_SRAM_BASE and CYDEV_PERIPH_BASE defined? These become the high order address bytes for the transmission data. Are the addresses defined by the Creator at build time? Which Spike gets used?
2) In the DMATxConfiguration function, this line:
CyDmaTdSetAddress(txTD, LO16((uint32)txBuffer), LO16((uint32) SPIM_TXDATA_PTR));
sets up the transaction descriptor. I take it that LO16((uint32)txBuffer) is the low 16 bits of the address of the transmit buffer - apparently this construction creates a pointer (or when it gets transferred to the function CyDmaTdSetAddress, it is seen as a pointer. Likewise LO16((uint32) SPIM_TXDATA_PTR) - but where is SPIM_TXDATA_PTR defined?
3) in the main function:
CyDmaChEnable(txChannel, STORE_TD_CFG_ONCMPLT);
while (0u == (SPIM_ReadTxStatus() & SPIM_STS_SPI_DONE))
{
}
Does enabling the DMA channel cause it to transmit? If not, what does?
Where can I find the various codes, like STORE_TD_CFG_ONCMPLT, and what they mean/do?
The while loop continues through each 8 bytes of the buffer, until both SPIM_ReadTxStatus() and SPIM_STS_SPI_DONE are 1.
4) At the beginning of main.c, the data buffers are declared:
/* Data buffers */
uint8 txBuffer [BUFFER_SIZE] = {0x0u, 0x01u, 0x02u, 0x03u, 0x04u, 0x05u, 0x06u, 0x07u};
uint8 rxBuffer[BUFFER_SIZE];
How does the information in the transmit buffer (looks like octal(?) or hex(?) bytes 0 through 7) lead to the expected results per the SPIM example pdf? It is clear that Master RX data: is written directly to the LCD display.
Expected Results
The LCD should display:
Master Rx data:
090A0B0C0D0E0F
5) Since I only want to transmit the data, as the cross-point switch is not an SPI device, but it does take serial data clocked in, in the same format as SPI ( CPHA= 0, CPOL=0 format.). I don't need the MISO input. The component sheet says it needs to be connected, but to what?
Is it okay to ground it, or tie it high? Data lines selection "Bi-directional" looks more like what I need: DATA and CLOCK. Since there is only one (not quite) SPI device, I don't need the Slave Select, and plan to leave it unconnected.
I expect a few more questions, but this should help move me along.
Thank you
Show LessIs there a standalone bootloader host application for download somewhere? Or do I have to tell others to download the whole Creator software if they want to update their firmware?
Show LessHi there,
I'm writing software for the PSoC (CY8C4125LQI-S433) in which I implemented the emulated EEPROM. I do get the issue that after a random amount of writes to the EEPROM, the PSoC hangs, seems to be in the CySysFlashWriteRow function.
To isolate and reproduce the problem I created a new empty project with only the EEPROM and a LED so I can see when the PSoC hangs. The problem occurs here too so there must be something going wrong in the EEPROM library.
Has anyone else experienced this problem?
#include <project.h>
const uint8_t EEPROM_em_EepromStorage[Em_EEPROM_PHYSICAL_SIZE]
__ALIGNED(CY_FLASH_SIZEOF_ROW) = {0u};
uint8_t eepromArray[15] = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15};
cy_en_em_eeprom_status_t eepromReturnValue;
int main (void)
{
CyGlobalIntEnable; /* Enable global interrupts. */
/*Initalize EEPROM with the start address of the memory location*/
eepromReturnValue = Em_EEPROM_Init((uint32)&EEPROM_em_EepromStorage[0]);
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
for(;;)
{
STAT_LED_Write(1);
CyDelay(500);
STAT_LED_Write(0);
CyDelay(500);
eepromReturnValue = Em_EEPROM_Write(0u, eepromArray, 15u);
/* Place your application code here. */
}
}
Show Less
客先よりPSoC Creator のversion 4.x は version 3.x 以前に比べてグラフィックなどの表示速度が遅くなっていると指摘を受けています。
質問①
使用環境にも依存するかと思いますが、PSoC Creatorのバージョンを更新をするに従い、グラフィック表示などの表示が遅くなる(処理が重くなる)などの要因、変更点があったりするものでしょうか?
質問②
グラフィック表示を早くする(処理を軽くする)ようなPSoC Creatorでの設定などあったりするものでしょうか?
どうか宜しくお願いします。
Show LessCYUSBS234DVKSetup won't install because it claims that "Microsoft VC++ 2008 Redistributable or later Not Installed".
But according to the "Apps and Features" listing in Win10 it idefinitely s installed, both the x86 and the x64 version. As are the 2010, 2012, 2013 and 2015-2019 versions.
I had four interrupt pins in a PSOC5 design that I changed to normal input pins with a NAND and interrupt to resolve some pin conflicts. Two of the old interrupt pin names are still reported after a build with "No input on Instance" and Terminal "int"signal" erquires connection when it is visible. A search all does not find any instance of the name.
Show LessI am encountering an discrepancy between the .map file size and the size of the struct in my program. The struct is defined in a shared file, and I use a shared_ram section in the linker files to instantiate the struct variable in the same RAM space for both cores so they both have access to it. My project is based on DFU_Upgradable_Stack.
1. I define the shared RAM region in dfu_common.ld
ram_app2_shared (rwx) : ORIGIN = 0x08010000, LENGTH = 0x00400
2. I define an alias for the shared ram region then assign .struct1 and .struct2 to it in dfu_cm0p.ld and dfu_cm4.ld for app2.
REGION_ALIAS("ram_shared", ram_app2_shared);
.struct1(NOLOAD):
{
*(.struct1)
} > ram_shared
.struct2 (NOLOAD):
{
*(.struct2 )
} > ram_shared
3. In the shared .c file I use CY_SECTION to tie the struct definitions to the same area in ram.
CY_SECTION(".struct1") struct SameStruct struct1;
CY_SECTION(".struct2 ") struct SameStruct struct2;
4. I instantiated another version of the same struct on cm0p without sharing or specifying anything in the linker files.
struct SameStruct struct3;
5. The result is when I print out sizeof() for all three, they are the same size, but the start address for struct2 is several bytes less than the start address for struct1 + sizeof(struct1). Also, printing the the address for the last element of struct1 reveals that it is about 0x14 bytes after the start address for struct2. In the map file, the size allocated for struct1 and struct2 is smaller than struct3. In the map file, the start address for struct3 is the same as revealed by printing out in the program.
This makes it pretty clear to me that the issue is somewhere in the linking process. This is just a guess, but it seems like the smaller size of struct1 and struct2 is almost what the struct would actually be without padding. SameStruct is large and includes other structs in files I do not want to edit. sizeof(struct1) = 0x260 but the size specified in the linker file is 0x1f0 and the distance between struct1 and struct2 is 0x1f0. The size specified in the linker file for stuct3 is 0x260.
I am thinking of abandoning the linker file method of sharing the same RAM space for a variable and just passing the reference over IPC, but that would require changing other code. Any ideas what I am doing wrong or why the sizes are different? Or is it just a bad idea to do it this way? Thanks!
Show LessI've been using PSOC Creator 4.4 on a very decent laptop running Windows 10 for a couple years now, and I have always been extremely annoyed everything that happens after I click "Program". It usually freezes for 20-30 seconds with the "Selecting Target" status, and then loads the "Select Debug Target" window, but that window is super glitchy, and I usually have to click and then wait for 5-10 seconds again before the target I selected is highlighted, and then unless I'm lucky, the screen freezes again for a few seconds before I can select "OK" and program the device. I usually build with Creator and then program using PSOC Programmer because Programmer doesn't always glitch out on me.
Is this normal? Sometimes it is better, but it NEVER runs smoothly. Also, the entire program freezes during compilation, and windows says it is not responding.
Sorry write such a whiny post, but I get soooo frustrated with this IDE sometimes, and I figured I would see if anyone has a way to make it better.
Show LessDear Sirs and Madams,
We would like to install only the "Bridge Control Panel", but it doesn't seem to be on the Infineon website.
Is it possible to install the Bridge Control Panel without installing PSoC Creator?
Regards,
Show Lesscybtldr_api2.h contains the "higher-level API that handles the entire bootload operation". I've successfully used CyBtldr_Program from this file to create a firmware update tool that reads from an external .cyacd file. However, I would like to embed the data from the .cyacd file directly into the executable so there is just one self-contained file to distribute to customers. I don't see any alternative to CyBtldr_Program that can handle this, though. Is there one?
CyBtldr_Program calls CyBtldr_RunAction, which calls CyBtldr_OpenDataFile, which uses fopen, so it needs a real file and can't work with internal data. Is there any way to handle this that's pre-written, or do I have to write it myself? Either converting the ASCII .cyacd file itself into xxd -i format:
unsigned char firmware_v1_0_cyacd[] = {
0x31, 0x45, 0x30, 0x37, 0x44, 0x30, 0x36, 0x39, 0x30, …
or converting the hex cyacd file data to an actual byte stream:
unsigned char firmware_v1_0[] = {
0x1E, 0x07, 0xD0, 0x69, 0x03, 0x30, 0x00, …
Either way is fine with me.
Show Less