PSoC™ 5, 3 & 1 Forum Discussions
Hi,
I am having problems getting the DMA to work.
My setup has the Delta Sigma to set to output 20bits. I use the Delta Sigma irq to transfer the ADC result to the FIR channel A. An IRQ atttached to the FIR triggers obtaining the results. This works fine.
I attached a DMA to the eoc of the delta sigma. and set the DMA to transfer the ADC result to filter B FIR.
The DMA setup is:
#define DMA_BYTES_PER_BURST 3
#define DMA_REQUEST_PER_BURST 1
#define DMA_SRC_BASE (CYDEV_PERIPH_BASE)
#define DMA_DST_BASE (CYDEV_PERIPH_BASE)
DMA_Chan = DMA_DmaInitialize(DMA_BYTES_PER_BURST, DMA_REQUEST_PER_BURST, HI16(DMA_SRC_BASE), HI16(DMA_DST_BASE));
DMA_TD[0] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_TD[0], 3, DMA_TD[0], 0);
CyDmaTdSetAddress(DMA_TD[0], LO16((uint32)ADC_DEC_SAMP_PTR), LO16((uint32)Filter_STAGEB_PTR));
CyDmaChSetInitialTd(DMA_Chan, DMA_TD[0]);
CyDmaChEnable(DMA_Chan, 1);
I can't seem to get the DMA to transfer anything from the ADC to the filter.
I've been at this for a while, and can't seem to find anything that resolves my issue
Show LessHi All,
This is a small project to develop a CDC+HID composite device class on PSoC3.
It uses an Interface Association Descriptor. This is needed, when two interfaces represent one functionality, in this case CDC.
These have been introduced in the application note: AN58726 PSoC 3/ PSoC 5LP USB HID Intermediate (with Keyboard and Composite Device), but has not been implemented in any project.
I hope you guys find it useful.
Enjoy!
Hi,
I am working on a project that needs to toggle an "H" Bridge at 125kHz.
If I drive just one output pin on and off I get the exact same ON and OFF period. When I add a second drive pin the ON time gets longer than off time for some reason. I have attached the bundle for the project. It just uses NOPs to create delay for on and off (I am not sure how accuracte the cyDelayus routine is).
If I uncomment NMOS1 only, I get 8us ON time and OFF time. If I comment out NMOS1 and use NMOS2 I also get 8us ON time and 8us OFF time. If I use Both then I get 10.7us ON time and 8us OFF time for BOTH.
The program needs to set P1/ N2 for the first 1/2 cycle and P2/N1 for second half with symettrical 4us period. (During each half cycle it switches off the unused pairs of control)
Thanks
Show LessHi
we just got 1K pcs CY8C24794 chip, and try to burn software by PSoC MiniProg. Programmer Version is 3.21.0, the latest version.
But. the programmer reported the message as below.
Detected SiliconID: "00 00 12 17" is not in database
Next , we changed the file, CY8C24090.dat, added new siliconID as below
,CY8C24794, CY8C24794-24LTXI, 56, 16384,2, 00_1D_11_17, 00_1B_11_17, 00_1B_12_17, 00_1D_12_17, 00_00_12_17,v50
then , the programmer can work.
my question is , why latest Programmer can' t support the chipset we just got ? maybe , our chipset is too old or wrong?
thanks
Spark from China.
Show LessHey!
I have run into a scenario where I am managing an external chip that requires me to send a control sequence, wait over a minute, then input the next part of the control sequence. Since busy waiting on the PSOC side would be super wastefull in this scenario.
I have decided it would be far better to place the PSOC into sleep mode instead. However, the maximum sleep time that can be set the CTW is just over 4 seconds. I was wondering in this case, what is normally the best solution? I am thinking about entering sleep mode repeaditly unitl the complete duration has elasped, for example, if I need to sleep for 60 seconds, I would enter and exit sleep mode using the CTW to wake me up (60/4) times.
Would me entering and exiting sleep mode this often cause problems or waste more energy than it's worth? What other strategies exists for trying to sleep longer than what the CTW can allow?
Thanks!
Jeremy
Show LessGreetings all,
This is my first post on the Cypress forums, and I could really use a bit of guidance. I've been a computer engineer for a couple of decades now, but this is the first time I'm using the Cypress chip. I'm sure there's a way to do what I need, I just don't know enough about the PSoC5 to do it. So here goes...
I have a chunk of memory (SRAM) that represents an array of 4-byte (32-bit) values. These values need to be transferred to my UDB via DMA so as to not encumber the CPU. The thing is though that only the lower 24 bits of each array entry contains data. Sending the 4th byte of each 32-bit array value will ruin the stream.
I've gotten the first DMA to transfer the data all at once, in either 3-byte burst or 4-byte burst, but it sends all 32-bits. I've tried sending the 4-byte data to an intermediate buffer, and then use a second DMA with the data length and burst size set to 3 to to eliminate the 4th byte, but it's not doing what I want. I've also tried putting the two DMAs in reverse order, just in case. And also a small variety or other arrangements. >sigh< No joy.
So, does anyone have a lot of experience with the DMAs that can help me?
Show LessIs there a command that can send data but not continue until all data has been sent out UART?
In my code below, the UART data is sent After the EN goes low again. I want to have 10ms of EN high, then send the data byte and then have EN low. However, the EN goes high and low and then data appears on port pin. I also tried WriteTXData function. Attached is copy of the component layout on workspace. The required output is 125 kHz carrier for 10ms followed by ASK modulated carrier. The enable pin controls external hardware and should enable the chip when carrier and data sent and then go low. Thanks
UART_Start();
for(;;)
{
EN_Write(1); //Start Carrrier
CyDelay(10);
UART_PutChar(0x55); //Send Modulated data
EN_Write(0);
CyDelay(100);
}
}
We have a program developed (PSoC Creator) by a consultant that runs on a CY8C3244PVI-133 chip. It ran properly on an earlier compiler (late 2013), but now stops at the first program line where a global variable is used. He has defined these (4) global variables immediately above the main.c routine as follows:
float32 gfTimeScale;
float32 gfAnalogRange;
int16 giLastAnalog;
uint8 gbPhase;
We are building this project under PSoC Creator 3.0 SP2 (10/2/14) and it builds fine. But running it under the debugger fails the first time one of the above variables is assigned (whether hardcorded at a numeric value, or calculated from simple arithmetic). Is it now illegal to define global variables this way (Keil 9.51)? We have tried everything we can think of to solve this problem but the program halts as soon as any of these global variables is used in a line of code, without any explanation other than that the program stopped at that line (and the global variable value shows as 0 on a mouseover within the debugger after program halt, even though it may be a simple assignment). For example, like this:
gfAnalogRange = MAX_ANALOG_VAL - MIN_ANALOG_VAL;
Both MAX_ANALOG_VAL and MIN_ANALOG_VAL are correct on a mouseover (4220 and 212, respectively). The program halts on this line. If we hardcode the value for gfAnalogRange as:
gfAnalogRange = 4008.0;
the program halts on that line which is a simple assignment. Anyone know what is happening here? Thank you.
Randy
Show LessHi,
i would like to off-line-filter a sampled array using a FIR-filter, for this i worte a simple code:
Filter_1_Start();
// Enable the interrupt register bit to poll
// Value 1 for Channel A, Value 2 for Channel B
Filter_1_INT_CTRL_REG |= (1 << Filter_1_CHANNEL_A);
for(n=0; n < N_s; n++)
{
Filter_1_Write16(Filter_1_CHANNEL_A, ADC_res
while (Filter_1_IsInterruptChannelA() == 0) ;
ADC_FIR = Filter_1_Read16(Filter_1_CHANNEL_A);
}
But what i've got is a zero-array ADC_FIR = 0
anyone any idea why?
thanks in advance
Hosam
Ps. i attached the Project, see below
the problem is a task in a bigger project, i hoppe, the description is clear enough
Show Less