Other Parts Discussed in Thread: UNIFLASH, ,
Hi,
I am facing the same problem as issued at this thread: /sys/phya.cal file is being created over and over again, fulfilling the SFLASH and preventing OTA updates with new files because of not enough storage (or not enough consecutive blocks, due to fragmentation). What I know: this file is used by NWP to store calibration parametrers of 5GHz PHY, like phybg.cal is used to 2.4GHz (no problem with phybg.cal, until now).
Analysing my device that refuses an OTA update with new files, using SL_FS_CTL_GET_STORAGE_INFO
, as stated at swru455, section 8.8, I get:
DeviceBlockSize 4096
DeviceBlocksCapacity 1024
NumOfAllocatedBlocks 1008
NumOfReservedBlocks 12
NumOfReservedBlocksForSystemfiles 0
LargestAllocatedGapInBlocks 3
NumOfAvailableBlocksForUserFiles 4
Padding 0 0
MaxFsFiles 240
IsDevlopmentFormatType 0
Bundlestate 0
Reserved 255
MaxFsFilesReservedForSysFiles 56
ActualNumOfUserFiles 46
ActualNumOfSysFiles 23
Padding 0
NumOfAlerts 0
NumOfAlertsThreshold 15
FATWriteCounter 239
I just have less than 20 user files at my solution and 45 user files are reported. This caught my attention. So I used sl_FsGetFileList
to obtain the file list and see what could be happening. The last 32 files from the file list are /sys/phya.cal with "not valid file" flag set, as can be seen below:
Name: /tmp/chanhist.tbl
AllocatedBlocks: 2 MaxSize(byte): 3656
Flags: 0040
Name: /sys/phya.cal
AllocatedBlocks: 6 MaxSize(byte): 11848
Flags: 0100
... (29x) ...
Name: /sys/phya.cal
AllocatedBlocks: 6 MaxSize(byte): 11848
Flags: 0100
Name: /sys/phya.cal
AllocatedBlocks: 6 MaxSize(byte): 11848
Flags: 0000
Currently I am using Code Composer Studio 9.30
Simplelink SDK 3.30.01.02
Service Pack 4.4.1.3_3.1.0.5_3.1.0.19
Uniflash 6.1.0
I tried with Simplelink SDK 4.30.00.06 / CCS 10.1.1 / SP 4.8 but the same occurs.
To assure this is not some problem due to implementation error, I flashed cloud_ota_CC3235SF_LAUNCHXL_tirtos_ccs example on a LAUNCHXL-CC3235SF. I could reproduce this behavior following the steps:
- Flash code using UNIFLASH;
- Connect a device (smartphone) to the AP created by CC3235SF;
- Add a new Profile, filling SSID and Password with an WiFi network in range;
- Wait the launchpad connects to the AP;
- Reset the Launchpad while in ping procedure.
- Connect to device using Uniflash and go to Online User Files
To image below show that there are more than 1 /sys/phya.cal file:
This screenshot was taken after 3 or 4 resets, so each execution 1 file is created and let corrupted to the next execution.
I don't know if the corruption of this file occurs just when reset is issued while pinging, I just used this event as a reference to frequently repeat this behavior, as I think calibration occurs at the first seconds of connection. But my guess is that this file is not being correctly closed. So, after a reset (ungracefull shutdown), to the next execution, the file appears as corrupted and a new one is created. This could potentially increase without control, until there is no space left for new files.
As this file belongs to system, it can't be deleted using sl_FsDel. My only alternative is reset to factory, but I don't think this is the correct approach. What I want to know is:
Am I doing something wrong? (Could you try to reproduce the steps using a launchpad to see if it occurs?)
There is a way to avoid this file from being created? There is a way to avoid this file from being corrupted? (My solution requires 5GHz, so disable it is not an option).
I could send you NWP logs, if is required, but I think it is unnecessary if you get the same result following the above steps.
Thank you,
Elder