PSoC™ 5, 3 & 1 Forum Discussions
text.format{('custom.tabs.no.results')}
Hello,
The datasheet for the RTC component says that it's based on a 1 PPS interrupt from a 32.768 kHz crystal.
It would be really nice for me (and probably others) if it was possible to configure it to be based on a different signal. I'd like to run the local RTC on the PSoC chip based on the 1 PPS output signal from my GPS module. That way I would only have one clock and wouldn't need to access the GPS RTC over the UART.
It seems like it might not be a huge change, because all the logic of responding to that interrupt would remain the same, but I might be wrong about that.
This isn't possible, right?
Show LessHello,
I am sure I am missing something here.
Could someone explain to me why the following code does not work? It works when I replace the sleep part with an one second delay.
#include <project.h>
int main()
{
CyGlobalIntEnable; /* Enable global interrupts. */
//enable the 1 second interval for RTC interrupt
RTC_WriteIntervalMask(RTC_INTERVAL_SEC_MASK);
//start the RTC
RTC_Start();
RTC_EnableInt();
/* Place your initialization/startup code here (e.g. MyInst_Start()) */
LED1_Write(0);
for(;;)
{
LED1_Write(~LED1_Read());
CyPmSaveClocks();
RTC_DisableInt();
CyPmSleep(PM_SLEEP_TIME_NONE,PM_SLEEP_SRC_ONE_PPS);
CyPmRestoreClocks();
RTC_EnableInt();
}
}
Thank you!
George
Show LessHi all,
I am working on a project that requires me to output a variable frequency squarewave as an excitation signal and sample a sensor's response with an ADC.
I am currently using a 16bit SAR ADC to sample my signal.
I have also connected a clock output to a GPIO pin for my excitation signal. To change the frequency, I send a command over UART which triggers the function:
LCclock_SetDividerRegister(frequency,0);
Everything works as expected, however I see a bit of high frequency noise appear on my power rails, while "sweeping through frequencies" and this noise is carrying over into my analog circuitry.
Any ideas on how to fix this noise? Maybe it is a grounding issue, or an issue with the PSOC5LP dev kit? The noise level is much better when sampling only a single frequency.
Show LessGood afternoon all!
I'm new to these forums, so hopefully this is the right place to ask for some guidance from the pSoC experts 🙂
I'm attempting to use the DMA engine to transfer data from the digital filter block to an external DAC using the SPI (configured as master mode). I've connected the DFB's DMA_Req_B output to the DMA drq input and verified that the DMA does transfer the desired data correctly if I target an SRAM memory location.
If I attempt to direct data to the SPI FIFO however, the interface remains quiet and the status bits reflect the FIFO is empty at all times (just as though the data isn't making it to the FIFO at all). The following code snippet shows my configuration:
// Filtered values -> DAC (via SPI)
DMA_DAC_Chan = DMA_DAC_DmaInitialize(2, 1, HI16(CYDEV_PERIPH_BASE), HI16(CYDEV_PERIPH_BASE));
DMA_DAC_TD = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_DAC_TD, 2, DMA_DAC_TD, DMA_DAC__TD_TERMOUT_EN);
CyDmaTdSetAddress(DMA_DAC_TD, LO16((uint32)OUTPUT_FILTER_HOLDBM_PTR), LO16((uint32)SPI_TXDATA_PTR));
CyDmaChSetInitialTd(DMA_DAC_Chan, DMA_DAC_TD);
CyDmaChEnable(DMA_DAC_Chan, 1);
The DMA's nrq output toggles after every instant I'd *expect* a transfer to have occurred, but still no SPI data appears. I've tried many permutations of SPI buffer address, pointer etc, but haven't found a combination that works. DMA writing to a global variable in SRAM is OK, though.
The SPI interface seems to be correctly configured - manually dropping a word into the buffer via:
SPI_WriteTxData(value);
works OK.
Does anyone have any idea what I'm missing? It's driving me crackers!
Cheers 🙂
Show LessHi all,
I have this code that will take in 8 bit samples via a SAR ADC then transfer it via DMA to the DFB Filter and then I have two DMAs, one requiring a HW request per burst and the other that does not so it double buffers them, transferring it to the SRAM.
My problem is that I am viewing data that either seems to have gaps in it, which is why I thought to double buffer the final filtered data, but this did not work. In fact I only achieved an even uglier signal. the pictures below are of the arrays the two DMAs transfer to. The First buffer always seems to have the data gap right in the beginning in the same place whenever I run it, while the second buffer seems to have substatially more gapping data, as well as the gaps change.
I don't know what I am doing wrong, below is the code for my DMAs.
For the first DMA I have
#define dma_out_A_BYTES_PER_BURST 2
#define dma_out_A_REQUEST_PER_BURST 1
#define dma_out_A_SRC_BASE (CYDEV_PERIPH_BASE)
#define dma_out_A_DST_BASE (CYDEV_SRAM_BASE)
dma_out_A_Chan = dma_out_A_DmaInitialize(dma_out_A_BYTES_PER_BURST, dma_out_A_REQUEST_PER_BURST,
HI16(dma_out_A_SRC_BASE), HI16(dma_out_A_DST_BASE));
dma_out_A_TD[0] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(dma_out_A_TD[0], LENGTH*2, /*DMA_END_CHAIN_TD*/ dma_out_A_TD[0], TD_INC_DST_ADR | dma_out_A__TD_TERMOUT_EN);
CyDmaTdSetAddress(dma_out_A_TD[0], LO16((uint32)Filter_HOLDAM_PTR), LO16((uint32)Filter_Ch_A));
CyDmaChSetInitialTd(dma_out_A_Chan, dma_out_A_TD[0]);
CyDmaChEnable(dma_out_A_Chan, 1);
Here is the code for the Second buffer
#define DMA_Buffer_BYTES_PER_BURST 2
#define DMA_Buffer_REQUEST_PER_BURST 0
#define DMA_Buffer_SRC_BASE (CYDEV_SRAM_BASE)
#define DMA_Buffer_DST_BASE (CYDEV_SRAM_BASE)
DMA_Buffer_Chan = DMA_Buffer_DmaInitialize(DMA_Buffer_BYTES_PER_BURST, DMA_Buffer_REQUEST_PER_BURST,
HI16(DMA_Buffer_SRC_BASE), HI16(DMA_Buffer_DST_BASE));
DMA_Buffer_TD[0] = CyDmaTdAllocate();
CyDmaTdSetConfiguration(DMA_Buffer_TD[0], LENGTH*2, /*DMA_Buffer_TD[0]*/ DMA_END_CHAIN_TD, DMA_Buffer__TD_TERMOUT_EN | TD_INC_SRC_ADR | TD_INC_DST_ADR);
CyDmaTdSetAddress(DMA_Buffer_TD[0], LO16((uint32)Filter_Ch_A), LO16((uint32)Buffered_Filter_Ch_A));
CyDmaChSetInitialTd(DMA_Buffer_Chan, DMA_Buffer_TD[0]);
CyDmaChEnable(DMA_Buffer_Chan, 1);
I have seen similar situations before, when I wasn't using the DFB filter, and a double buffer fixed it, because I was accessing the array when it was half way through being populated, which is why I added the second buffer that didn't need a HW request each time. This time though it does not seem to work, what am I doing wrong?
I do not think it is a problem with the DMA transfer between the ADC and the filter component, since there is no array being created there and it is a direct sample by sample transfer. Also I would imagine the filter would not result in such a direct peak, and rather would create a much more rounded dip.
Thanks in advance for all of your help,
scarlson
Show LessHello,
I would like to ask if there is a possibility of waking up the PSoC from sleep using an interrupt (internal) every one second? I am interested if it is possible to do this without counting milliseconds. I used the SleepTimer, but, unfortunately, it generates an interrupt every 1024ms.
Thank you!
George
Show LessI have a windows 8.1 PC and have downloaded the CypressDriverInstaller_0 application to install the correct driver. The application runs, opens up a cmd window during the installation does a bunch of driver instalation then closes the cmd window and says it completed successfully. I then plug my PSOC5 into the USB it "installs" the device driver. However, under the unknown devices in the device manager it shows USBUART with an exclamation on it... I've tried a few times uninstalling and reinstalling etc... It's quite frustrating. Any help anyone could offer would be greatly appreciated.
Show LessI am unable to scroll the message on lcd. Help needed..
thanks
Hi was looking into using the CY8CMBR3xxx for an application I'm looking to develop. Essentially I was looking to be able to detect a plastic cup of water being placed upon a thin 1/8" or less sheet of plastic. This application may have some induced liquid spillage as well. I have Bought the development kit and have found the proximity sensor on the dev. board to work fairly well. I was wondering how many proximity sensors can be used out of a single CY8CMBR3xxx controller? For my application I would need 10 sensors spaced roughly 2-3 inches apart. Or if anyone has any other suggestions that would be great!
Thanks
Show LessHi again. I wonder if anyone can give some advice on interfacing the Cypress FM25C160B FRAM (SPI) memory chip to a PSOC5. I tried the straight forward approach of specifying an SPI component and connecting the MOSI, MISO, CLOCK, and specified a processor pin for chip select. But no matter what I do, I cannot read anything but zeroes out of the FRAM. Even reading the status register (after setting the WREN bit) returns zero. Is there some reason why my interface will not work? I'd appreciate any comments, especially if you have done this. (By the way the FM25C160B used to be made by a company called Ramtron, but they were bought out by Cypress a few weeks ago. I have used the FM25C160B devices from Ramtron in a number of PIC applications with no problem, but this is the first time I have tried it with a PSOC.
Thanks, Russ
Show Less