<div dir="ltr"><div dir="ltr"><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Hi
Christian,</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Thanks for your quick response.</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">Our boot process is like, first u-boot will be loaded from the NOR flash and then the uboot copies RTEMS application from NOR flash to the RAM. After that RTEMS executes entirely from RAM. <br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"><br></div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">How can i issue a
global interrupt disable? Is it using
<b>
rtems_interrupt_disable(0)</b>?</div><div class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small">One more doubt, if i issue a global interrupt disable then will there be chance that i can miss few clock ticks?<br></div><div><div dir="ltr" class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr"><p><b><span style="font-family:arial,helvetica,sans-serif"><span style="font-weight:normal"></span></span></b></p><p><b><span style="font-family:arial,helvetica,sans-serif"><span style="font-weight:normal"><span class="gmail_default" style="font-family:arial,helvetica,sans-serif;font-size:small"></span>Thank you & Regards,</span></span></b></p><span style="font-family:arial,helvetica,sans-serif"><b><span style="font-weight:bold;font-size:9pt">Amarnath MB</span></b><b><span style="font-weight:bold;font-size:9pt"></span></b></span><br><span style="font-family:arial,helvetica,sans-serif"><b><span style="font-weight:bold;font-size:9pt"></span></b></span><span style="font-family:arial,helvetica,sans-serif"> <br></span></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, May 1, 2019 at 8:16 PM Christian Mauderer <<a href="mailto:christian.mauderer@embedded-brains.de">christian.mauderer@embedded-brains.de</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">----- Ursprüngliche Mail -----<br>
> Von: "Amarnath MB" <<a href="mailto:amarnath.mb@mistralsolutions.com" target="_blank">amarnath.mb@mistralsolutions.com</a>><br>
> An: "RTEMS Users" <<a href="mailto:users@rtems.org" target="_blank">users@rtems.org</a>><br>
> CC: "Ravi G Patil" <<a href="mailto:ravigp@mistralsolutions.com" target="_blank">ravigp@mistralsolutions.com</a>>, "Shekhar Suman Singh" <<a href="mailto:shekhar.s@mistralsolutions.com" target="_blank">shekhar.s@mistralsolutions.com</a>><br>
> Gesendet: Mittwoch, 1. Mai 2019 16:28:23<br>
> Betreff: RTEMS_FATAL_SOURCE_EXCEPTION in RTEMS<br>
<br>
> Hi All,<br>
> <br>
> I'm developing RTEMS 5.00 BSP and device drivers for a custom ARM926EJ-S<br>
> core. I was successful in porting and building BSP for the ARM core.<br>
> <br>
> We are facing a strange issue with the generic NOR flash driver we have<br>
> developed. Our device drivers are designed such that it can be used with<br>
> RTEMS as well as the bare metal programs.<br>
> Our driver is working fine in bare metal program (erase, read, write<br>
> everything), but when we use the driver with RTEMS application and issue an<br>
> erase call, then the application gives RTEMS_FATAL_SOURCE_EXCEPTION.<br>
> <br>
> For testing driver in RTEMS, we have added each test routine as a custom<br>
> shell command using rtems_shell_add_cmd().<br>
> <br>
> For your info we also tested the same driver with u-boot and it works<br>
> fines.<br>
> Can anyone guide me on this issue?<br>
> <br>
> *Thank you & Regards,*<br>
> *Amarnath MB*<br>
> <br>
<br>
Hello Amarnath,<br>
<br>
it's a little hard with the given information to tell you a concrete problem. There are a lot of possible reasons for a RTEMS_FATAL_SOURCE_EXCEPTION.<br>
<br>
>From your description, my guess would be some problem with an interrupt. Most U-Boot code avoids interrupts. I don't know about your bare metal application but maybe in some test application, you don't have too much interrupts too. In RTEMS you have most likely at least a periodic tick interrupt.<br>
<br>
Do you execute your code from the same flash or do you keep some data in the flash? In that case it could be an access error during a flash erase or write (for example caused by an interrupt). In that case you might have to do a global interrupt disable before you enter certain routines.<br>
<br>
Best regards<br>
<br>
Christian<br>
-- <br>
--------------------------------------------<br>
embedded brains GmbH<br>
Christian Mauderer<br>
Dornierstr. 4<br>
D-82178 Puchheim<br>
Germany<br>
email: <a href="mailto:christian.mauderer@embedded-brains.de" target="_blank">christian.mauderer@embedded-brains.de</a><br>
Phone: +49-89-18 94 741 - 18<br>
Fax: +49-89-18 94 741 - 08<br>
PGP: Public key available on request.<br>
<br>
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.<br>
</blockquote></div>