12 Replies Latest reply on Sep 4, 2012 2:56 PM by user_1377889

    ASM Error

    hanumanth.vinukonda

       Hello,

         

                  I tried to run the Assembly Language Program but i am facing the error"The command 'Ax51.exe' failed with exit code '2'."

         

      May i know how to rectify thiserror??

        • 1. Re: ASM Error
          hanumanth.vinukonda

           Can i get some sample projects based on ASEMBLY LANGUAGE Program .Please....

          • 2. Re: ASM Error
            user_1377889

            Your errormessage states that the assembly failed. Usually there is an errormessage before indicating the cause of the fail, plse have a look at that.

               

            The Keil documentation has a couple of examples and an example for a complete assembly file with all its segments.

               

             

               

            Bob

            • 3. Re: ASM Error
              yuan.wei

               Hi,Bob:

                 

              I happended pass by, there are some problems. I use "PSoC Creator  2.2 Component Pack 6", and I can't use asm("nop"), I don't know why, i just can't compailed it. 

                 

              I really need 1us to control my sensor, please give me some solutions.

                 

              Max

              • 4. Re: ASM Error
                user_1377889
                        Despite from Asm not working for you, there are some delay functions (CyDelay(), CyDelayus() ) which are documented in the "System Reference Guide" to be found here under the name "Boot_V_4"   
                   
                Bob   
                • 5. Re: ASM Error
                  user_1377889
                          Here is the link : www.cypress.com/?app=forum&id=2233&rID=55749   
                     
                  Bob   
                  • 6. Re: ASM Error
                    user_1377889
                            Hopefully this is right, sorry but there is no edit function in this forum... http://www.cypress.com/?rID=51972   
                       
                    Bob   
                    • 7. Re: ASM Error
                      user_14586677

                      The delay functions are subject to the error tolerance of the clock, which is

                         

                      +/- 5% at 48 Mhz for PSOC 3.

                         

                       

                         

                      If you need precise timing for your sensor, use external clock oscillator, specify

                         

                      in clock editor the tolerance needed. Note that cannot be < main clock oscillator specs

                         

                      obviously, whether using internal or external  main clock.

                         

                       

                         

                      Regards, Dana.

                      • 8. Re: ASM Error
                        user_78878863

                        The PSoC3 clock gets accurate to about 0.25% when the USB mode is used (because the PSoC then syncs to the USB clock)

                        • 9. Re: ASM Error
                          yuan.wei

                           Hi,Bob:

                             

                          Thanks,cydelayus() is perfect for me ,I use PSoC 3 to communicate with DHT11 (Temperature & Humidity Sensor), I configure the pin as bidirectional, and the drive mode is resistive pull down, I need to output the signal to active the sensor and then receive the signal from the sensor.

                             

                          I am not sure how to control the pin , especially the configuration.

                             

                          I upload my project , please have a look.

                          • 10. Re: ASM Error
                            user_1377889
                                    Yes, I will. In the meantime have a look at the pin-component, there is an Output Enable signal to control the direction.   
                               
                            Bob   
                            • 11. Re: ASM Error
                              user_14586677

                              USB Clock (from TRM) -

                                 

                               

                                 

                              USB Mode Operation

                                 


                              This device works with an automatic clock frequency locking
                              circuit for USB operation. This design allows for small fre-
                              quency adjustments based on measurements of the incom-
                              ing USB timing (frame markers) versus the IMO clock rate.
                              With this clock locking loop, the clock frequency can stay
                              within spec for the USB Full Speed mode (±0.25% accu-
                              rate). The IMO must be operated at 24 MHz for proper clock
                              locking, with the doubler supplying 48 MHz for USB logic.
                              The USB locking feature for the IMO can be enabled by the
                              register bit FASTCLK_IMO_CR [6].

                                 

                               

                                 

                              and

                                 

                               

                                 

                              The USB needs a 48 MHz clock to function. The clock to the
                              USB is called the clk_usb. The clk_usb can be derived from
                              either IMOCLK, doubler clock (IMOCLK * 2), PLL, or the DSI
                              clock. For further details on the clock for this block, see the
                              Clocking System chapter on page 121. The OsClock block
                              of the USB trims the USB clock to lock to the frequency of
                              the USB packets. The USB clock is clocked to the USB
                              token as per the USB 2.0 Specification. When the frequency
                              is locked with other USB bit streams, the block will locate a
                              particular edge in the USB packet. The number of clock peri-
                              ods between these edges is measured to lock the internal
                              oscillator frequency with the  frequency of the USB packet.
                              The frequency tuning value is sent to the Clocking system
                              by the USB Block to lock the frequency. The locking of the
                              frequency is done by the hardware and needs no user inter-
                              vention. The Synchronization Block of the Arbiter handles
                              the synchronization of the USB Clock and System Clock.

                                 

                               

                                 

                              and from AN60631

                                 

                               

                                 

                              USB Clock

                                 


                              PSoC 3 and PSoC 5LP’s clocking architecture allows the
                              device to automatically trim the IMO to the USB traffic
                              from an attached host. This feature allows the PSoC 3 or
                              PSoC 5LP to achieve a USB accurate clock using only the
                              IMO and USB traffic with a host as a reference. This
                              accuracy is achieved by adjusting the IMO’s trim setting
                              after measuring the IMO frequency, using host USB start
                              of frame events as a timing reference.

                                 

                               

                                 

                              What this tells us is that the relative accuracy to the host must conform to +/- .25%, that

                                 

                              is, however, not derived from an absolute clock source, but the host traffic timing. So the

                                 

                              delay functions still are only as accurate as the absolute clock source feeding the processor.

                                 

                               

                                 

                              Think of one PSOC acting as host, on internal clock, and the other as slave, also on internal

                                 

                              clock. PSOC clock is only 5% accurate, but USB host to slave is .25%, relative key word.

                                 

                               

                                 

                              Regards, Dana.

                              • 12. Re: ASM Error
                                yuan.wei

                                 Hi,Bob:

                                   

                                Have you try the project ?  Is there something wrong ? 

                                   

                                I am not familiar with this forums .I uploaded my project ,but I can't find it on the page, so I upload it again .

                                   

                                I make enougn comments to help you read my code in main.c.

                                   

                                There is a datasheet about the sensor DHT11(Temperature & Humidity Sensor) ,It is a 1 wire digital sensor.

                                   

                                http://www.micro4you.com/files/sensor/DHT11.pdf     

                                   

                                Maxwell

                                • 13. Re: ASM Error
                                  user_14586677

                                  Some people are having problems using Chrome to upload, use

                                     

                                  IE or Firefox to upload project archive, zip file.

                                     

                                   

                                     

                                  Regards, Dana.