# FF\_ERR\_DEVICE\_DRIVER\_FAILED, FreeRTOS-FAT, and possible resolutions?

**URL:** <https://forums.freertos.org/t/ff-err-device-driver-failed-freertos-fat-and-possible-resolutions/22632>\
**Category:** Libraries\
**Created:** [February 25, 2025, 8:27pm UTC](https://forums.freertos.org/t/ff-err-device-driver-failed-freertos-fat-and-possible-resolutions/22632 "2025-02-25T20:27:31Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![pktm](https://avatars.discourse-cdn.com/v4/letter/p/8edcca/32.png) [@pktm](https://forums.freertos.org/u/pktm)\
**Post date:** [February 25, 2025, 8:27pm UTC](https://forums.freertos.org/t/ff-err-device-driver-failed-freertos-fat-and-possible-resolutions/22632/1 "2025-02-25T20:27:31Z")

</div>

Hi all,

Thanks in advance for your help.

I’m trying to get some sample FreeRTOS-FAT code working on an AM243 Eval board (with SD slot/card).

```auto
fp = ff_fopen(fileName, "w+");

```

returns 0. When I step through it, I see that the underlying error being returned by FF\_CreateFile is FF\_ERR\_DEVICE\_DRIVER\_FAILED. However, that’s about as far as I get diagnosing it. What should I try next to diagnose/debug the true underlying condition here, please?

Also of note: if, immediately after ff\_open(), I perform stdioGET\_ERRNO(), that returns 0, too, in a way that suggests something else might be wrong.

Thanks!

---

<div class="post-metadata">

**Author:** ![aggarg](https://d3iykfbgfh8zhg.cloudfront.net/user_avatar/forums.freertos.org/aggarg/32/4245_2.png) [@aggarg](https://forums.freertos.org/u/aggarg)\
**Post date:** [February 26, 2025, 5:56am UTC](https://forums.freertos.org/t/ff-err-device-driver-failed-freertos-fat-and-possible-resolutions/22632/2 "2025-02-26T05:56:28Z")

</div>

> [@pktm](#):
>
> I see that the underlying error being returned by FF\_CreateFile is FF\_ERR\_DEVICE\_DRIVER\_FAILED.

This error means that the your device driver returned an error. Are you using [the correct port](https://github.com/FreeRTOS/Lab-Project-FreeRTOS-FAT/tree/main/portable) for your part? I’d suggest to step into the code and see where the error is coming from?
