Access PSoC internal register via HW

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
Anonymous
Not applicable
        Hello, I am programming the PSoC 3 and I am using the API to put the ADC, UART and other peripherals to sleep. Now I am thinking of using hardware to control them accessing their registers, is it possible using some sort of control registers? Thank you in advance!   
0 Likes
9 Replies
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        Have a look at the register trm here http://www.cypress.com/?rID=37833   
Bob   
0 Likes
Anonymous
Not applicable
        Do you want to design some logic to control the registers of the component? Or you want to control the component by writing to the register by software?   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Normally what comes to mind is Verilog for HW to HW control of

   

PSOC resources and UDB configuration.

   

 

   

Might be useful to give an example of what you are trying to do. Also clarifiy,

   

you mentioned sleep, are you trying to do this when PSOC is asleep ?

   

 

   

Regards, Dana.

0 Likes
Anonymous
Not applicable
        Thank you for your responses. However, what I am doing right now is to put ADC and other peripherals to sleep via SW (ADC_Sleep() - ADC_Wakeup() ...). After doing this, if I want to consume less power I put the CPU in Alternate Active mode. But considering to consume even less power, I wanted to do like a combinational system, putting the components to sleep and waking them up using only Hardware, by accessing the correct registers. I don't know if it is possible or not. Thank you   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

I am gnawing on your expression "Accessing Register via hardware" which your repeated in your last post.

   

You cannot access registers without CPU despite using DMA which only works resonably when the register addresses are consecutive which will not be the case in your application.

   

As long as there are APIs provided for the sleep- and wakeup functionality there will be no difference between those and the access to the appropiate registers directly. Some functionality is only accessable through registers (cause APIs forgotten to make) but you can put it into your own functions.

   

 

   

Bob

0 Likes
Anonymous
Not applicable

i agree..... @chlzr how can u access control registers by using only hardware.......

   

.although there are other ways by which you can come out of low power modes using hardware like....[using reset or interrupts].!!

   

Regards!!!

0 Likes
Anonymous
Not applicable

 If you know the address locations of all the registers (even dis-continuous), burst size & length of the transfer, then you can define then in a fixed array.

   

 

   

Use one DMA (say Main DMA) to transfer the data from a source to desintation in the defined burst size & length of the transfer

   

Use another DMA (configuration DMA) to set the source, destination, burst size & length of the transfer of the above Main DMA.

   

Configuration DMA can take the respective data from the array defined and load them into Main DMA for appropriate transfers.

0 Likes
Anonymous
Not applicable

But how will he be able to access it with hardware?

   

Regads!!!

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored
        AFAIK the DMA is the only hardware component (apart from the MCU core) which can write into memory, and is therefore able to write to status registers.   
So you need to come up with a scheme using the DMA to write stuff to memory. It might be possible to use DMA to transfer bytes from (internal) pins to memory (via a status register).   
If you use indexed DMA, you can even use another register to determine the target address.   
Or use the data path or the digital filter block for some computations and use their outputs.   
But I think this will get really complicated. It might be way easier (and less resource-intensive) to just trigger an interrupt and the use some code to do what you want.   
0 Likes