THE WAKE UP CHANNEL
Go to bottomPage: 1
TOPIC:
#418
Re:Encore Z8F6423 and interrupt bug 3 Years, 11 Months ago Karma: 0
I have resolved problem. On my development board I has Encore 6423 with footprint 0333. After solder new Encore with footprint 1016 program works fine. Also interface I2C began work without problems.
mezon (User)
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#411
Re:Encore Z8F6423 and interrupt bug 3 Years, 11 Months ago Karma: 0
IRQE bit is cleared while returned form function. Inside function this bit is still set "1".
mezon (User)
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#407
Re:Encore Z8F6423 and interrupt bug 3 Years, 11 Months ago Karma: 5
Without knowing the project settings and the supporting code, it is difficult to tell.
You could contact customer support and submit a trouble ticket.

To get input from the community, you will need to post more information, such as the product you are using; the supporting code for the interrupt routines, delay, timer, etc; the project settings for things like the floating point libraries, memory, etc; perhaps even the map file.
You could step through each line to make sure the correct values are calculated as well as watching the IRQCTL register for changes.
You could try separating the functions, so you can step through each of them to see if something else is going on.

An example would be:

change:
P_npw = exp(a - c*log(temperatura)- (b/temperatura));

to:

float temp;
....
temp = log(temperatura);
temp *= c;
temp = a - temp;
temp = temp - (b/temperatura);
P_npw = exp(temp);


Just some suggestions to figure out where the problem is.
Tom Ormiston (Admin)
Admin
Posts: 184
graph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
#405
Encore Z8F6423 and interrupt bug 3 Years, 11 Months ago Karma: 0
I have the function to the calculation of the mas density of the air. The function works, but there is in the register IRQCTL the bit IRQE during the return from the function IRQE is cleared and program hung up!!!!


float gestosc_powietrza(unsigned int Pbar, float T, float Humidity)
{
float gestosc;
float P_npw; // cisnienie nasycenia pary wodnej
float temperatura;
float cisnienie;

float a = 59.484085;
float b = 6790.4985;
float c = 5.02802;


temperatura = (T + 273.15);
cisnienie = 100.0 * Pbar;

//==========================================================================================
// cisnienie NASYCENIA pary wodnej w powietrzu w danej temperaturze
//==========================================================================================
P_npw = exp(a - c*log(temperatura)- (b/temperatura));


//==========================================================================================
// gestosc powietrza
//==========================================================================================
gestosc = cisnienie - (0.37802 * Humidity * P_npw);
gestosc /= (287.055*temperatura);

return gestosc;
}

/////////////////////////////////////////////////////////////////////////////////////////////////////////////
main
{
while(1)
{
gestosc_powietrza( pressure, temp, humi) ;
delay_ms(500);
}


function delay_ms() working with Timer 0 and generate interrupts.

Why function gestosc_powietrza() clears IRQE bit??? i can`t understand. When I add to main loop instruction EI() program works, but its by-pass of the problem.
mezon (User)
Fresh Boarder
Posts: 18
graphgraph
User Offline Click here to see the profile of this user
The administrator has disabled public write access.
 
Go to topPage: 1
The Sample Center is managed separately
from Zilog's Customer Support services,
and therefore requires a separate login.
Acknowledged! Take me to the Sample Center.
Disable this pop-up in the future.