Skip to content

[BUG] Extraneous FF_PRINTF #55

Closed
Closed
@carlk3

Description

@carlk3

Describe the bug
A concise description of what the bug is. If possible, that is the code is not proprietary, please upload the code in a GitHub fork such that we can reproduce the bug.

Every time I mount a "disk", I get a message:

prvDetermineFatType: firstWord 0000FFF8

This comes from:

            /* FAT 32! */
            pxPartition->ucType = FF_T_FAT32;
            #if ( ffconfigFAT_CHECK != 0 )
                if( ( ( ulFirstWord & 0x0FFFFFF8 ) != 0x0FFFFFF8 ) &&
                    ( ( ulFirstWord & 0x0FFFFFF8 ) != 0x0FFFFFF0 ) )
                {
                    /* _HT_
                     * I had an SD-card which worked well in Linux/W32
                     * but FreeRTOS+FAT returned me this error
                     * So for me I left out this check (just issue a warning for now)
                     */
                    FF_PRINTF( "prvDetermineFatType: firstWord %08lX\n", ulFirstWord );
                    xError = FF_ERR_NONE; /* FF_ERR_IOMAN_NOT_FAT_FORMATTED; */
                }
            #endif /* ffconfigFAT_CHECK */
            xError = FF_ERR_NONE;

in Lab-Project-FreeRTOS-FAT\ff_ioman.c.

I don't know what it means.

I have four SD cards from three different vendors, and they all behave this way:

SandDisk Ultra:

Manufacturer ID: 0x3
OEM ID: SD
Product: SC16G
Revision: 8.0
Serial number: 0x9d49ce1d
Manufacturing date: 1/2021

SDHC/SDXC Card: hc_c_size: 30386
Sectors: 31116288
Capacity: 15193 MiB (15931 MB)

PNY Elite:

Manufacturer ID: 0x74
OEM ID: JE
Product: SDU1
Revision: 0.2
Serial number: 0x336e46
Manufacturing date: 1/2019

SDHC/SDXC Card: hc_c_size: 30199
Sectors: 30924800
Capacity: 15100 MiB (15833 MB)

SP 3D Nano:

Manufacturer ID: 0x0
OEM ID:
Product: USD
Revision: 1.0
Serial number: 0x301e
Manufacturing date: 8/2022

SDHC/SDXC Card: hc_c_size: 60947
Sectors: 62410752
Capacity: 30474 MiB (31954 MB)

Target

  • Development board: [e.g. HiFive11 RevB]
  • Instruction Set Architecture: [e.g. RV32IMAC]
  • IDE and version: [e.g. Freedom Studio 4.12.0.2019-08-2]
  • Toolchain and version: [e.g. riscv64-unknown-elf-gcc-8.3.0-2019.08.0]

Raspberry Pi Pico
Lab-Project-FreeRTOS-FAT @ 25129e5

Host

  • Host OS: [e.g. MacOS]
  • Version: [e.g. Mojave 10.14.6]

FreeRTOS-Kernel @ 1b2b090

To Reproduce

  • Use project ... and configure with ...
  • Run on ... and could observe ...

Simply FF_Mount one of these kinds of cards.

Expected behavior
A concise description of what you expected to happen.

I expected no FF_PRINT unless some kind of debug flag was set.

Screenshots
If applicable, add screenshots to help explain your problem.

Wireshark logs
To help us identify the issue and/or reproduce it, please attach Wireshark logs if applicable.

Additional context
Add any other context about the problem here.
e.g. code snippet to reproduce the issue.
e.g. stack trace, memory dump, debugger log, and many etc.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions