ASM Error

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

cross mob
Anonymous
Not applicable

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

0 Likes
13 Replies
Anonymous
Not applicable

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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked

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

0 Likes
Anonymous
Not applicable

 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

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        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   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        Here is the link : www.cypress.com/?app=forum&id=2233&rID=55749   
   
Bob   
0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        Hopefully this is right, sorry but there is no edit function in this forum... http://www.cypress.com/?rID=51972   
   
Bob   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
HeLi_263931
Level 8
Level 8
100 solutions authored 50 solutions authored 25 solutions authored

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

0 Likes
Anonymous
Not applicable

 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.

0 Likes
Bob_Marlowe
Level 10
Level 10
First like given 50 questions asked 10 questions asked
        Yes, I will. In the meantime have a look at the pin-component, there is an Output Enable signal to control the direction.   
   
Bob   
0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

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.

0 Likes
Anonymous
Not applicable

 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

0 Likes
ETRO_SSN583
Level 9
Level 9
250 likes received 100 sign-ins 5 likes given

Some people are having problems using Chrome to upload, use

   

IE or Firefox to upload project archive, zip file.

   

 

   

Regards, Dana.

0 Likes