Hello! It seems that there is a great advantage by using the Dual Data Pointer while accessing to XDATA. In the user manual it says: There are also devices without anything resembling _XPAGE, but luckily they usually have dual data-pointers. For these devices a different method can be used to correctly initialize xdata variables. A default implementation is already in crtxinit.asm but it needs to be assembled manually with DUAL_DPTR set to 1. Since the AT89LP51 the DPS toggle is achieved by incrementing...
Helo! Is it possible to do this in the crtxinit.asm for the AT89LP51?
Hi there! It is just to say the problem still occurs. As soon as the following condition is true, bad things happen: else if(data->in_data.an_data.curr_out.A > data->cfg.inv.ovl.step1 || data->in_data.an_data.curr_out.B > data->cfg.inv.ovl.step1 || data->in_data.an_data.curr_out.C > data->cfg.inv.ovl.step1) { curr_max_val = data->in_data.an_data.curr_out.A; if(data->in_data.an_data.curr_out.B > curr_max_val) { curr_max_val = data->in_data.an_data.curr_out.B; } if(data->in_data.an_data.curr_out.C...
Hi there! It is just to say the problem still occurs. As soon as the following condition is true, bad things happen: else if(data->in_data.an_data.curr_out.A > data->cfg.inv.ovl.step1 || data->in_data.an_data.curr_out.B > data->cfg.inv.ovl.step1 || data->in_data.an_data.curr_out.C > data->cfg.inv.ovl.step1) { curr_max_val = data->in_data.an_data.curr_out.A; if(data->in_data.an_data.curr_out.B > curr_max_val) { curr_max_val = data->in_data.an_data.curr_out.B; } if(data->in_data.an_data.curr_out.C...
I'm trying to create a small example but in that small example I'm not being able to recreate what is happening in the big project.
I was thinking that it was "Improve handling of variables on stack in return." fault (because the code is big, it is compiled with the large memory model and I could be in the stack size limit) but now that you mention the float comparison... yes, I'm using floats exp = ((float)curr_max_val - data->cfg.inv.ovl.step1) / data->cfg.inv.ovl.exp_div; ovl_acc += expf(exp); printf("exp: %u acc: %u\n", (uint16_t)(exp * 10), (uint16_t)ovl_acc); if(ovl_acc >= 24192.0) //it is for 50ms Cycle { ovl_acc = 0;...
I was thinking that it was "Improve handling of variables on stack in return." fault (because the code is big, it is compiled with the large memory model and I could be in the stack size limit) but now that you mention the float comparison... yes, I'm using floats exp = ((float)curr_max_val - data->cfg.inv.ovl.step1) / data->cfg.inv.ovl.exp_div; ovl_acc += expf(exp); printf("exp: %u acc: %u\n", (uint16_t)(exp * 10), (uint16_t)ovl_acc); if(ovl_acc >= 24192.0) //it is for 50ms Cycle { ovl_acc = 0;...
sdcc revision 10077 mcs51 problem