Commit Graph

114 Commits

Author SHA1 Message Date
Lefucjusz
f585c33b7a [BH-2002] Fix crash when connected with broken USB cable
Fixes of the issues that would cause device
crash when connected with broken USB cable:
* fixed memory leaks in VCOM init and deinit
functions;
* guarded accessing desktopWorker object in
message handlers, as messages are asynchronous
and might arrive after worker has already been
destroyed. Not the cleanest solution, but
does the trick
2024-06-06 14:37:07 +02:00
Lefucjusz
7b20578d8b [BH-1776] Grinn USB fixes
Fixes and improvements implemented by external
company Grinn, expanding the set of supported
chargers.
2024-05-29 18:17:17 +02:00
Dawid Wojtas
54bf8311b0 [BH-1770][BH-1677] Update fsl drivers
Now the system uses 2.14.0 version.
Add only necessary drivers:
- pit
- pmu
- rtwdog
- snvs_hp
- snvs_lp
- src
- trng
- wdog
- gpio
- gpt
- lpi2c
- lpuart
- lpuart_edma
- common
- common_arm
- dmamux
- edma
- flexram
- flexram_allocate
- clock
- cache
- CMSIS
- dcp
- iomuxc

Changed speed of the USDHC clock from ~109MHz to ~81MHz.
Also changed bus timing from kMMC_HighSpeedTiming to
kMMC_HighSpeed200Timing for better efficiency.
2024-02-21 18:58:12 +01:00
Lefucjusz
9a8ffff654 [BH-1863] Fix deleted file popup showing in Relaxation
* Fix of the issue that 'File has been
deleted' popup would show in Relaxation
app at the end of playback if the
playback was paused at least once,
even though the file wasn't actually
deleted.
* Added very basic audio decoder error
handling and propagation mechanism.
* Minor refactor around several
audio-related parts.
2024-02-01 12:09:32 +01:00
Lefucjusz
32c6769cb6 [BH-1657][BH-1833][BH-1854] Add WFI and SDRAM self-refresh mode
* Added mechanism enabling CPU to
enter WFI mode when the OS is
in idle, what results in large
power consumption reduction.
* Added mechanism to switch SDRAM to
self-refresh mode before entering
WFI, what resulted in further power
consumption reduction.
2024-01-22 12:32:35 +01:00
Lefucjusz
0f43423419 [MOS-996] Disable MTP protocol
Disable MTP file transfer protocol.
2023-10-26 16:20:09 +02:00
Lefucjusz
ccee6e79fc [CP-2184] Fix issue with reset events getting lost
Update of usb_stack submodule version in main repo.
2023-09-18 09:07:51 +02:00
Maciej Gibowicz
79b3c32842 [BH-1757] Fix Hard Fault handling
Added a critical section when handling Hard Faults
co-author @Lefucjusz
2023-08-23 10:29:57 +02:00
Lefucjusz
b53dec1ff2 [MOS-1012] Fix occasional crash when unplugging Pure from PC
Fix of the unhandled error issue that resulted
in occasional device crash when disconnecting
from PC with MC app running.
2023-08-03 09:42:18 +02:00
Lefucjusz
8021ebb5c1 [MOS-1006] Fix modifying data in .text section when setting SN
Fix of the issue that setting serial number in
USB stack resulted in writing to read-only
.text section, what causes undefined behavior.
2023-07-17 14:35:47 +02:00
Lefucjusz
1f50621c2f [MOS-184] Fix unit tests not failing on duplicate test case
Fix of the issue that unit tests build would not
fail when unit test contained 2 test cases with
identical name.
Changed Catch2 submodule to local fork.
Minor unit tests and build target docs cleanup.
2023-06-27 09:21:37 +02:00
Lefucjusz
2643d9a92f [MOS-997] Fix failing sync with Mudita Center
Fix of the issue that sync with Mudita Center
would fail often after changes introduced in
CP-1968.
2023-06-20 11:02:21 +02:00
Lefucjusz
783ebcbb6c [MOS-183] Fix RT1051 debug build
Fix of multiple issues that resulted
in debug build failing.
2023-06-14 13:12:50 +02:00
Lukasz Mastalerz
7dc758bbc3 [CP-1968] Disconnecting the device during file upload causes problems with the USB
Fixed the problem with an endless loop while sending data
when USB is already disconnected.
2023-06-12 12:04:38 +02:00
Lefucjusz
da838b8c8f [BH-1706] Fix inaccessible MTP on Harmony
Fix of the issue that Harmony's MTP
was constantly locked after MOS-686
fix, as the mechanics of unlocking
was not handled for Harmony at all.
2023-06-02 14:47:29 +02:00
Dawid Wojtas
4ae3d9e474 [CP-2014] Fix file list isn't always loaded
Fix critical sections for send/recv virtual com functions.
2023-06-01 14:29:31 +02:00
rrandomsky
891483cb83 [MOS-686] Fixed MTP availability only after phone unlocked 2
This is fix for Windows. It's fix for previous fix witch:
Fixed file access via MTP even when phone is not unlocked.
Now access is granted when the phone is unlocked by the user
entering a passcode. If the phone is not passcode protected
(passcode is nor set) then access to the files is always possible via MTP.
2023-05-30 10:58:28 +02:00
rrandomsky
c96dc7dc30 [MOS-686] Fixed MTP availability only after phone unlocked
Fixed file access via MTP even when phone is not unlocked.
Now access is granted when the phone is unlocked by the user entering
a passcode. If the phone is not passcode protected (passcode is nor set)
then access to the files is always possible via MTP.
2023-05-18 15:57:09 +02:00
Mateusz Piesta
205fedb9a6 [BH-1595] USB reset procedure
* Fixed incorrect reset procedure
* Minor refactor
2023-05-16 09:42:34 +02:00
Mateusz Piesta
b6235923bf [BH-1595] USB charger detection issues
* Fixed issues with USB charging port detection
* Fixed memory leak in usb_stack/OS integration layer
* Fixed incorrect handling of software timer
* Minor cleaning/refactor.

[BH-1595] Turned off USB/PC charging

Charging enabled only for a dedicated charger. Users won't be able
to charger while connected to the PC.
2023-04-28 13:54:36 +02:00
Lukasz Mastalerz
35fb50f605 [CP-1942] Re-adding the same file results in an increase in the amount of occupied space
Fixed problem with adding files with the same name resulting in increasing its size
instead of replacing the file.
USB Stack changes.
2023-04-13 08:37:22 +02:00
Lukasz Mastalerz
948ab3f4d2 [CP-1837] Fix MTP crashes
Update usb_stack submodule.
2023-04-06 11:20:26 +02:00
Adam Wulkiewicz
e16bb031eb [CP-1837] Random crashes while copying files
Use ConstMemoryConstrainedFileRef newly added to taglib
2023-03-31 13:06:57 +02:00
Marcin Zieliński
9bf69c652f [MOS-878] Don't break audio playback on file deletion
Since a currently played file is deleted, the player
goes to the next file from the list. A special case:
if the deleted file is the last one, the playback
stops (and can be resumed by the user).
2023-02-22 17:59:14 +01:00
Lefucjusz
cce5061c10 [MOS-890] Fix issues with long filenames
Fix of the multiple issues that manifested
when trying to copy file with name longer
than 64 characters, which in worst scenario
would lead to OS bootloop due to filesystem
corruption.
2023-02-22 09:42:14 +01:00
Mateusz Piesta
7bb2caed22 [MOS-297] Fixed release build for the simulator
Fixed.
2023-02-21 13:13:53 +01:00
Lefucjusz
ff89d4db3e [MOS-854] Fix crash with USB logs enabled
Fix of the issue that phone would freeze/crash
with USB logs enabled, which was caused by
logging from inside critical section.
2023-02-15 12:01:46 +01:00
Mateusz Piesta
ef189d96a1 [MOS-205] Unneeded fs notify events
Fixed problem with fs notification events
being sent one time too many.
2023-02-15 09:51:20 +01:00
Mateusz Piesta
494121a1ba [MOS-892] Fixed MTP/FS integration issues
Fixed regression introduced by MOS-544.
2023-02-09 12:10:36 +01:00
Lefucjusz
0742ef8430 [MOS-890] Fix invalid filename after copying from Win11
Update usb_stack submodule after fix
for filename corruption.
2023-02-01 11:31:37 +01:00
Bartosz
942b837f92 [MOS-71] Add clearing USB CDC buffer after reconnect/init
Fixes an issue, when somehow transmission is interrupted
and rest of the buffer is being transmitted,
 altering the original message
2023-01-26 14:52:42 +01:00
Mateusz Piesta
a9ebeb4f99 [MOS-544] MTP integration issues
* It's now possible to rename files using MTP
* Fixed issue with fs notification being sent from MTP
before file transfer is complete. This resulted in audio
tracks appearing on the MusicPlayer list while still being transferred.
2023-01-20 13:33:15 +01:00
Bartosz
fd5f7f1821 [MOS-872] Extended json11 supported types
Moved statvfs to stack from heap
2023-01-19 16:41:56 +01:00
Bartosz
27cf19317a [MOS-765] Fixed crash on invalid ID3 tag
Bumped taglib version to latest master
Added sanity check for version field in tag parser in taglib
so in case of damaged/invalid tag it returns no tag at all

It was caused by zipped mp3 files and renamed to mp3 again
2022-12-30 17:51:33 +01:00
Lukasz Mastalerz
6f4bedbcf9 [CP-1413] Windows displays wrong name of connected device
Changes in usb_stack
2022-12-09 12:36:35 +01:00
Lukasz Mastalerz
3b2e1ef675 [CP-1665] Adding an information about device colour to USB descriptor
Getting information about device colour and changing it to number.
Pass information about device colour to usb_stack.
Set a bcdDevice with the corresponding value.
2022-12-02 09:24:10 +01:00
Lefucjusz
b281a39f42 [MOS-744] Fix MTP integration
Fixed issues with integration
of MTP with filesystem:
- fixed memory corruption in
get_disk_properties();
- removed spare space hack
causing MTP to return invalid
free space and capacity of
the storage;
- added mtime and ctime
handling;
- minor code cleanup.
2022-10-27 18:47:27 +02:00
Maciej-Mudita
6ebd1550db [MOS-686] Revert - Fix the accessibility of user files by MTP
This reverts commit 42ca53a732.
2022-09-22 10:20:36 +02:00
Maciej-Mudita
42ca53a732 [MOS-686] Fix the accessibility of user files by MTP
User files accessible via MTP only if phone is unlocked
2022-09-16 09:52:27 +02:00
Mateusz Piesta
5fc2f024db [CP-1560] MTP root path
Make MTP root path configurable.
2022-09-14 12:41:54 +02:00
Lucjan Bryndza
523eb6f577 [MOS-513] Fix issues related to the GCC12 gcc
Fix issues related to the GCC 12
Fix paths for ignore license headers
2022-06-02 13:24:09 +02:00
Adam Dobrowolski
3343f02809 [MOS-266] Call StateMachine implementation
With some tests, documentation and so on
2022-05-02 15:54:33 +02:00
Paweł Joński
7a9ba7ffa8 [BH-1448] MTP closing routine and VCOM reset routine
MTP closing routine and VCOM reset routine
2022-04-20 11:17:55 +02:00
Mateusz Piesta
1ea2c45350 [BH-1452] Remove board directory from module-os
Moved board-specific code to module-bsp.
Extracted several smaller CMake targets to avoid
circural dependencies and reduce compile time.
2022-04-13 13:14:22 +02:00
Maciej Gibowicz
619685d70a [MOS-339] Fix rapid change of CPU frequency
After disconnecting the USB cable, the CPU consumption
increased to over 80% (for 4 MHz), which resulted
in a cyclical change in the CPU frequency and finally
a much shorter battery life.
2022-04-11 08:54:54 +02:00
Mateusz Piesta
2f42cd5e73 [BH-1424] FreeRTOS update
Updated FreeRTOS source code to 10.4.6.
Moved FreeRTOS sources to the third-party directory.
Added necessary changes to the CMake configuration.
Split FreeRTOSConfig.h. From now, each board has its own.
Added missing log headers.
Minor refactor of the module-os cmake.
Fixed stack overflows in bell application main and time service.
2022-04-07 13:31:28 +02:00
Adam Dobrowolski
cc02ffffbb [MOS-258] System profile util works with separate rtt
Profiling Move RTT handling to interfacing library
Library for msgpack sink
magic enum updated
performance monitor fixups
2022-04-07 11:32:49 +02:00
Maciej Gibowicz
314415bc4e [MOS-333] Energy optimization for the usb stack
Switching USB PLL and USB PHY
for current consumption saving
2022-03-31 15:30:16 +02:00
Adam Dobrowolski
053f270655 [MOS-282] Librarisation of services and test service
* options work a bit better ,now services and apps are
  selectable by option in cmake
* test service example added
* major documentation for module-services
* documentation for project configs and logs

Co-authored-by: Bartosz Cichocki <sp2fet@gmail.com>
Co-authored-by: Mateusz Piesta <mateusz.piesta@mudita.com>
2022-03-18 08:06:21 +01:00
Adam Dobrowolski
f7f5bc377a [EGD-8208] Added stop audio route on async response
We get Token on play, and require it in stop. While we cant
stop sound by title & data set to play. And adding standard
handling causes either totally synchronous calls or requires
multiple additional guards it seemed like best use.
Fixed expectation for the same named Response, but meant for bell
Needed so that
- we ring only when needed
- we handle CLIP and RING properly
Applied style
Missed file added
Moved SML logger as it's usefull to some more common parts of code
2022-02-22 13:36:27 +01:00