PSoC™ 5, 3 & 1 Forum Discussions
Hi,
i have create 2 projects on psoc creator. In both use the 4 available opamp and was wondering if there is any way to switch between them without using the programmer?
Regards,
Show LessHi,
In the datasheet of the Vref component, it specifically states that you can connect it to an AMUX and shows examples.
When I connect the Vref 0.256V to the AMUX channel I get warning that there is no actual connection to the ADC_DelSig that the AMUX is connected to. What does this mean? I can read it.
Nick
Show LessHello,
unfortunately I broke my DevBoard and need to ask you; otherwise I would just test it.
Regarding the DMA feature I would have some questions:
1) Can I implement several TDs in one DMA component with NextTD attribute equals "End"? So I could just say something like "select TD4" and start --> wait for TD to end --> select another TD and so on.
2) I would like to use it with an UART component. Is it correct, that I need to watch out the TX buffer size and the amount of data to be transmitted? If the buffer size would be 4 bytes and the DMA transfers 8 bytes I would need two TDs as a chain and the second one will be triggered when TX buffer is empty again?
Best regards.
Show LessHello,
I am streaming some binary data through my hardware and I want to make the latest 1000 bits available to CPU on demand at any point of time. I want to implement this by constantly filling a buffer by DMA. So I want a Circular buffer or a FIFO buffer capable of holding at least 1000 bits (uint8 buf[128]) Is it possible to implement this in hardware? Any suggestions?
Show LessUsing PSOC5LP, I am attempting to send a stream of ADC data to the USB over USBUART w/ DMA. Currently, I have the following:
USBUART_LoadInEP(USBUART_cdc_data_in_ep, ADC_sample, 62); //DMA Endpoint for transmitting ADC Data from PSOC-->PC
USBUART_ReadOutEP(USBUART_cdc_data_out_ep, rdBuffer, RDBUFFERSIZE); //DMA endpoint for reading USBUART data from PC-->PSOC
The user sends a command from the PC to the PSOC5LP USBUART via the ReadOutEP
function to start sampling. The PC then automatically streams ADC data to the PC via the LoadInEp
function. Sampling will continue indefinitely.
I am sampling, as an example, a linear voltage sweep with digital values from 0->100. Every time I trigger the command from the PC, we will sample the linear sweep. We can call each sweep a "frame".
Right now, I am transferring data to the PC, but I dont really know when the "frame" started. This results in misaligned data. So, I believe I need to pack the ADC data into a simple communication protocol that labels "start frame" and "end frame" with a byte string.
The problem is, I do not really know the correct way to add data to the ADC DMA since it all happens automatically.
I have 2 ideas right now, but I am not sure if this is the correct way to go about it.
- Run this function whenever I receive the start command from the PC:
USBUART_PutString(StartFrameBytes)
. Then, start DMA. - Create a new endpoint that links to the string StartFrameBytes[] and then swap back to the original ADC DMA endpoint once the StartFrameBytes have been successfully sent.
Any help would be greatly appreciated.
Show LessHi there,
Im looking to boost the input gain of a PDM mic on the PSoC 4 Pioneer Kit Community Project#102 – USB Audio using the PSoC 5LP.
Can anyone guide me on how to do this either by multiplying the PCM signal via the code or enabling the USB input volume control so I can control the microphone gain via the host computer?
Im banging my head against the wall on this!
Id really appreciate any help.
Charlie
Show LessHow to prevent unwanted DMA transactions after enabling a DMA channel with queued transaction requests.
Summary:
If a disabled DMA channel receives a request to perform a transfer, the request will be queued up similar to a pending interrupt. When the channel is enabled, the pending transfer request will be executed, resulting in a transaction that may not be desired.
The workaround is to queue up a “terminate channel” request. This request takes precedence over the transfer request. As soon as the channel is enabled, the terminate request is executed instead of the transfer request. This clears the pending transfer requests and disables the channel. The channel must be re-enabled afterward to function as intended.
Details:
This problem was discovered when an ADC End Of Conversion (EOC) was connected to the DMA ReQuest (DRQ) terminal of a DMA channel. The DMA channel was only really needed during a brief high speed sampling window. The ADC would be used normally other times, with software requesting a start of conversion and the "conversion done" bit being polled by the CPU to determine when the conversion was complete.
It was observed that when the ADC was disabled and the DMA channel was turned on (enabled), a sample would mysteriously appear in RAM. This was occurring even though it was guaranteed that the EOC signal was not asserted when the channel was enabled.
It was determined that when the ADC was used normally, the EOC was asserting the DRQ of the disabled DMA channel. This request was remembered by the DMA channel, even though the DMA channel was disabled. When the channel was enabled, this "remembered" DRQ was being executed immediately, resulting in an unexpected DMA transfer.
The fix is to assert a CPU request to terminate the chain before enabling the channel. By doing this, both requests (the transfer request and the terminate request) will be queued up in the DMA channel, waiting for the channel to be enabled. When the channel is enabled, the terminate request will take precedence over the transfer request and the DMA channel will terminate immediately, erasing the pending transfer request. The channel needs to be re-enabled after being enabled the first time since the terminate request will also disable the channel.
Below is example code, showing how the terminate request should be made before enabling the channel:
// Your DMA configuration code goes here
// --->
// ....
// <---
// End DMA config code
// To clear unwanted transfer requests (DRQ), issue a CPU terminate chain request
CyDmaChSetRequest(DMA_Channel, CPU_TERM_CHAIN);
// Enable the DMA channel, This enable kills the spurious DMA transaction if there is one
// and disables the channel, must re-enable
CyDmaChEnable(DMA_Channel, 1);
// re-enable the DMA channel
CyDmaChEnable(DMA_Channel, 1);
Hello,
I am working on a project with the 5LP, where I need to semi-frequently change the "settings" on an application via PC => USB => 5LP.
These setting are simply pure numerical integer data. The hardware can completely reset to receive the new settings if necessary.
I've experimented with a bootloader/bootloadable system, where the bootloadable runs the whole application with whichever data settings built into it. However this feels kinda clunky, rebuilding and programing the whole application for just some settings changed.
I was wondering what other USB setups might work better?
Thanks for any advice!
ngohara
Show LessHi all,
I would like to create a static adc window that specifically buffers 1024 2byte-words but does not slide.
I am thinking DMA would be the most efficient way to do this. I would have to use multiple TD's I'm assuming since the ADC_sample() only gets one 16 bit sample at a time but I need to create an array of them, but since the number of TD descriptors is limited to 128 I would have to use two sets of DMAs with a counter to determine when the one dma has fully buffered 128 2byte-words and then transfer those 128 2byte-words to a different buffer, essentially doing the second transfer 8 times. Of course I wil have to use a counter to determine when the first DMA buffer is finished to make sure I don't grab overlapping data. Once all of this is done I can have another counter looking at the second dma to determine when it has completed 8 transfers.
Is this something that is achievable using the PSoC 5lp?
If there is a better way please let me know, or if I am thinking about this wrong.
Thanks,
scarlson
Show LessHi,
My project involves amplifying a bipolar signal and process it digital using digital lock-in amplifier.
I am particular interested to use PSOC 5 for my project. Can any one help me with the following:
1. What is the gain bandwidth of PSOC 5 Op-amp The datasheet quoted typical 8 MHz but what is the max?
2. How can I amplify my bipolar signal using the built in PGA?
3. Can I connect external components to use in conjunction of the built-in Op-Amp to amplfy my bipolar signal? If I can, how to do it?
Thanks a lot for your times and attention.
Show Less