PSoC™ 5, 3 & 1 Forum Discussions
Hello,
I'd to know which is the best method in terms of speed to load a DMA from SRAM.
My DMA load 32 bit from SRAM and write this value into the Shift Register FIFO.
My instruction is:
CyDmaTdSetAddress(DMA_ShiftReg_TD[0], LO16((uint32)SSI_Tx.b), LO16((uint32)ShiftReg_interface_IN_FIFO_VAL_LSB_PTR));
where SSI_Tx is a union:
union {
uint32 l;
uint16 w[2];
uint8 b[4];
} SSI_Tx;
If I should change my instruction with the follow:
CyDmaTdSetAddress(DMA_ShiftReg_TD[0], LO16((uint32)fifo), LO16((uint32)ShiftReg_interface_IN_FIFO_VAL_LSB_PTR));
where "fifo" is an array:
uint32 fifo[4];
it would be more quicly to tranfer data from DMA to ShiftRegister or not?
Thanks and regards
Manuel
Show LessHi,
I'm developing some UART communication with PSoC 1 and I'm getting this error:
type error in argument 2 to `strstr'; found `pointer to __flash char' expected `pointer to char'
Code is as simple as this:
if (strstr(rx_buff,"OK") != NULL)
{
LED_On();
}
Am I missing something? this "__flash" thing it's new to me on C.
also apears when I try to compare some char on an IF.
char test[3] = "OK"
if ( test == "OK") ---> this lines gives again __flash error.
Have been trying and reading texts but I don't get it, any documentation on __flash or an advice?
Thank you in advance.
Show LessI'm an EET student that is making the rather steep leaning curve on my own from the PIC18 family to the Cypress PSOC family. I've found I learn best by setting out on a project with a purpose and then learn from my face-plants along the way. Couple of hopefully trivial questions for the online masses to help move me along:
1) How can you reassign which device is used/assigned in the analog routing? For example, I have a project with SAR ADC input on port0 and an seperate SAR ADC input on port3. For some reason the IDE auto-router decided to assign my port0 input to SAR1 and my port3 input to SAR0, with some rather interesting and unnecessary routing complexity. I'm having trouble figuring out how to force my SAR to pin relationship so I can keep as many future routing options as open as possible. What is the intended work-flow for this?
2) There are a number of references in the analog routing window for the DeltaSigma and SAR ADCs that I can't seem to find any explanation of what they are. On the DeltaSigma: "vcm" (voltage common mode??), "qtz_ref" (looks like it sets full-scale??). On the SAR: "Vrefhi_out" (looks very routable, so I really can't figure out what its purpose is??).
I'm sure this will not be the last time I ask for guidance from the group. I ask for a little forgiveness as I ask some likely rudimentary questions as I learn the ins and outs of the PSOC system. Thanks!
-EM
Show LessHi all,
I know that the normal VDAC can work directly with DMA. But can DVDAC be used with DMA to read data from ROM? Anybody has an idea how to use it?
Thanks
Show LessHello All,
I'm trying to transfer a few values between an array and a datapath register and FIFO. However, I don't have a good grasp on the ins and outs of DMA. I think I've figured it out, but I was wondering if anyone could give my work a glance.
I have the following:
- A 16-bit datapath whose instance name is DelHist_SM_DP
- An array defined as uint16 DelHist_I_target [5]
- A DMA whose instance name is DelHist_Target_DMA
When the drq line on the DMA is pulsed, I want the following to occur:
- Transfer first value (2 bytes) in the array to the datapath data register D0.
- Fill the datapath FIFO F0 with the remaining 4 values (8 bytes total) of the array.
Since I don't understand the DMA very well, I relied on the DMA wizard to set it up. I have attached a screenshot of my entry. The output of the wizard (with one modification) is below. Note that, because the wizard didn't recognize the datapath, I had to tell it that I was doing an SRAM to SRAM transfer, then manually modify the destination base.
Am I on the right track?
Paul
/* Defines for DelHist_Target_DMA */
#define DelHist_Target_DMA_BYTES_PER_BURST 127
#define DelHist_Target_DMA_REQUEST_PER_BURST 0
#define DelHist_Target_DMA_SRC_BASE (CYDEV_SRAM_BASE)
// #define DelHist_Target_DMA_DST_BASE (CYDEV_SRAM_BASE)
#define DelHist_Target_DMA_DST_BASE (CYDEV_PERIPH_BASE) // Modified base address
/* Variable declarations for DelHist_Target_DMA */
/* Move these variable declarations to the top of the function */
uint8 DelHist_Target_DMA_Chan;
uint8 DelHist_Target_DMA_TD[2];
/* DMA Configuration for DelHist_Target_DMA */
DelHist_Target_DMA_Chan = DelHist_Target_DMA_DmaInitialize(DelHist_Target_DMA_BYTES_PER_BURST, DelHist_Target_DMA_REQUEST_PER_BURST,
HI16(DelHist_Target_DMA_SRC_BASE), HI16(DelHist_Target_DMA_DST_BASE));
DelHist_Target_DMA_TD[0] = CyDmaTdAllocate();
DelHist_Target_DMA_TD[1] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DelHist_Target_DMA_TD[0], 2, DelHist_Target_DMA_TD[1], TD_AUTO_EXEC_NEXT);
CyDmaTdSetConfiguration(DelHist_Target_DMA_TD[1], 8, CY_DMA_DISABLE_TD, DelHist_Target_DMA__TD_TERMOUT_EN);
CyDmaTdSetAddress(DelHist_Target_DMA_TD[0], LO16((uint32)DelHist_I_target), LO16((uint32)DelHist_SM_DP_D0_PTR));
CyDmaTdSetAddress(DelHist_Target_DMA_TD[1], LO16((uint32)&DelHist_I_target[1]), LO16((uint32)DelHist_SM_DP_F0_PTR));
CyDmaChSetInitialTd(DelHist_Target_DMA_Chan, DelHist_Target_DMA_TD[0]);
CyDmaChEnable(DelHist_Target_DMA_Chan, 1);
Hello Every one,
I am making a SPI master slave test program with certain conditions:
I want to do the following:
Master is sending an 8 bit data in order to start the communication.
At the same time slave will directly send some dummy value.
Then: if the master has send a value 0x02 then the slave should send 0x10u.
otherwise it will give 0x58u.
I write the program (please have a look at the attachment). But, some how its not working as it supposed to work! there must be something wrong.
I will look forward to hearing from you.
Show LessHi,
I'm developing a project on a PSoC5LP and I have to use a RS485, in the past I developed the same project with RS232 and the bootloader is very good and fast, but now, when I try to use RS485 (with TX_enable pin) I have a lot of problems, I always have this error message: "CYRET_ERR_DATA : The data is not of the proper form". Is there something that I have to add if I use RS485 instead of RS232?
Thank you for the time you'll decide to give me.
bye
Show LessI have uninstalled the psoc designer which is normal for creating projects ,and reinstalled it.
When reinstalling ,a pop-up window of Windows Script Host appears, which says:script:***\PSoC Designer\AppModHandler.vbs line:89 error:no permission code:800A0046 source: error during operation of Microsoft VBScript.
I admit the error and go on with the installation. When it finishes, I can open Psoc designer, but can't open any existing project or creating a new one.
Could anyone meet with the same problem or konw how to solve it?
Looking forward to your help!
Show LessHi,
I know I've been through this before. I am trying to us sprintf to print floating point numbers. I made the recommended changes to the Build Settings to Use newliv-nano Float Formatting, Addition Libraries m. Still not working. Returns nothing.
It is Creator 3.3 on a PSoC5.
Nick
Show LessHi,
Is it a good practice to add timeout while waiting SPI Status done after spi_write or is it something highly unlikely to occur?
while(!(SPIM_1_ReadTxStatus() & SPIM_1_STS_SPI_DONE));
Best,
Nico
Show Less