9 Replies Latest reply on Aug 12, 2013 2:17 PM by HeLi_263931

    Access PSoC internal register via HW

              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!   
        • 1. Re: Access PSoC internal register via HW
          JoMe_264151
                  Have a look at the register trm here http://www.cypress.com/?rID=37833   
          Bob   
          • 2. Re: Access PSoC internal register via HW
                    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?   
            • 3. Re: Access PSoC internal register via HW
              DaKn_263916

              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.

              • 4. Re: Access PSoC internal register via HW
                        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   
                • 5. Re: Access PSoC internal register via HW
                  JoMe_264151

                  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

                  • 6. Re: Access PSoC internal register via HW

                    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!!!

                    • 7. Re: Access PSoC internal register via HW

                       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.

                      • 8. Re: Access PSoC internal register via HW

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

                           

                        Regads!!!

                        • 9. Re: Access PSoC internal register via HW
                          HeLi_263931
                                  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.