This patch fixes the problem, while receiving R1b type of response from the card.
In case of R1b response the continuous stream that the card sends must be checked whether the signal indicates busy status and wait until a non zero response.
The issue was found by using f_mkdir("directory_name").
The function always returned FR_DISK_ERR due to an unhadled case in sdio_write_sectors().
According to this documentation: http://www.convict.lu/pdf/ProdManualSDCardv1.9.pdf#page=92 stop transmission command should be sent after writing multiple blocks.
This patch fixes this bug also adds a test case for it.
If `sdk_ets_timer_arm_ms_us` is called right after `vPortExitCritical` inside `sdk_ets_timer_disarm` on line 247 (by an ISR for example, which was my case), execution will loop forever on line 196, since `timer->next!=ETS_TIMER_NOT_ARMED`, which was supposed to be changed in line 248.
By delaying the IRS or context switch until `sdk_ets_timer_disarm` the problem is fixed.
* Introduce sbBYTES_TO_STORE_MESSAGE_LENGTH
* Fix bug in ucStreamBufferGetStreamBufferType() - which is only used by the
Percepio trace tool.
* Update the line within vTaskStartScheduler() that was setting xTickCount to 0
to instead set it to configINITIAL_TICK_COUNT.
* Introduce xMessageBufferNextLengthBytes() and tests for the same.
* Add call to traceTASK_SWITCHED_IN() in vTaskStartScheduler() so trace tools
can see the first task to run.
* Correct definition of StaticTask_t in the case that portUSE_MPU_WRAPPERS is
set to 1.
* prvTaskCheckFreeStackSpace() now returns configSTACK_DEPTH_TYPE to allow
return values greater than max uint16_t value if required.
* xStreamBufferSend() and xStreamBufferReceive() no longer clear task
notification bits - clearing was unnecessary as only the task notification
state is used.
* Correct out of date comment in tasks.c.
* Fix typo in comment in queue.h.
A number of the ROM functions were pointing to wrappers that saved and
restored the $a0 register, but the functions they called either did
not use $a0 or saved and restored $a0 as needed anyway.
NMI Irq error paths call into printf which will use the newlib locks
but these can not be used within the NMI, a task switch can not occur
here. This case would be a terminal error path that is attempting to
write some debug message in the process, so just bail out of the
locking in this case. As a warning a ':' character is emitted and this
will typically prefix lines emitted in this context - it would be an
error for this path to be take in normal operation.
This change means that there is only one set of global stdin, stdout, and stderr
FILE streams shared by all the threads. This reduces memory usage and avoids
having to close these streams before threads exit. These streams still have a
lock to synchronise access.
Look-up tables were used for determining the delay loop counts before.
Based on these hand-tuned values, the loop overhead was estimated for
each option -- 80 and 160 MHz, fast and slow GPIO access. Instead of the
great number of tunable parameters one now only has to tune the overhead
values if the code is changed.
Functions were added to the API which allow setting an arbitrary
frequency. API backward compatibility is retained.
i2c: fix potential overflow situation
* The mdns responder has been reworked to lower stack and memory usage. This is
a variation on the upstream code, it use malloc whereas the upstream code uses
pools. The high stack usage of the mdns responder was problem for
esp-open-rtos, so we might have to maintain the differences for now.
* Improved lwip core locking, and lock checking. Upstream improvements, that
need some added support from esp-open-rtos specific code. More core lock is
performed when calling from the esp-open-rtos code now, so a little safer. The
checking is not enforced, but projects might see warning messages and might
want to look into them.
* The esp-open-rtos lwip support has been sync'ed with the new freertos port
included with lwip. There are still some minor differences.
* A few lwip timer bugs have been resolved. This might help resolve some issues.
* Plus it picks up all the other upstream fixes and improvements.
* The default lwip stack has been lowered from 768 words to 480 words,
due to the reduced stack usage by the mdns responder.