<div>I am developing a TI RTOS application for the CC1352 with SimpleLink SDK version 4.40.04.04. This application includes serial console functionality courtesy of the UART2 driver. In some rare cases, I observed that typing in the serial console would cause the UART interface to stop responding.</div><div></div><div></div><div>I was eventually able to capture this issue in the debugger. Initially I observed the ICall task stuck in NOROM_RFCDoorbellSendTo from rfc.c. A post from the Zigbee & Thread forum led me to investigate the power constraints from the PowerCC26X2 driver. Sure enough, a hardware watchpoint on PowerCC26X2_module.constraintCounts[PowerCC26XX_DISALLOW_STANDBY] showed it being set to 0 while UART receive was active. After this, the CC1352 went into standby, at which point the UART interface was disabled.</div><div></div><div></div><div></div><div></div><div></div><div>3d object converter 4.40 serial keygen download</div><div></div><div>Download File:
https://t.co/rBeOdEeBip </div><div></div><div></div><div>The next time the CC1352 woke up, UART2CC26X2_initHw automatically re-enabled the UART peripheral, but did not enable RX or TX. The next call to UART2_readTimeout invoked UART2_rxEnable, which neglected to actually enable reception through UART2Support_enableRx, because state.rxEnabled was still set for the UART2_Object.</div><div></div><div></div><div>Thus, state.rxEnabled is out of sync with the RXE bit in the CTL register, and the UART interface is rendered unable to receive data. Additionally, the fact that the PowerCC26XX_DISALLOW_STANDBY constraint has been released prematurely can cause underflow in PowerCC26X2_module.constraintCounts[PowerCC26XX_DISALLOW_STANDBY] and wreak havoc on the system if the UART interface is intentionally disabled in the future.</div><div></div><div></div><div>A close inspection of this code does not reveal any problems. The state.txEnabled variable tracks whether the PowerCC26XX_DISALLOW_STANDBY has been set. The only writes to state.txEnabled are within these two functions, and UART2Support_dmaStartTx is only called from UART2CC26X2_hwiIntFxn or from UART2_writeTimeout with HWI disabled. From this perspective, it should not be possible for UART2CC26X2_hwiIntFxn to release PowerCC26XX_DISALLOW_STANDBY unless it had already been set by UART2Support_dmaStartTx.</div><div></div><div></div><div>This confirmed my suspicion that UART2CC26X2_hwiIntFxn was releasing PowerCC26XX_DISALLOW_STANDBY more times than UART2Support_dmaStartTx set it. Additionally, it proved that state.txEnabled was getting modified unexpectedly.</div><div></div><div></div><div>To continue my investigation, I scoured the code looking for any place that state.txEnabled could be modified unintentionally. Initially I feared some memory access error, but that seemed unlikely, since state.txEnabled is part of a bitfield, of which all the other bits remained in their expected states.</div><div></div><div></div><div>In an attempt to isolate changes to the byte containing state.txEnabled so that I could catch them with a hardware watchpoint, I began eliminating writes to other values in the bitfield. I found that my problem went away when I eliminated the write to state.readTimedOut in UART2CC26X2_readTimeout:</div><div></div><div></div><div>Because state is a bitfield, state.readTimedOut is stored in the same byte as other bitfield values, including state.txEnabled. When UART2CC26X2_readTimeout writes to the address of state.readTimedOut in step 3, it uses the value that was retrieved in step 1. If state was modified between steps 1 and 3, the value retrieved in step 1 is out-of-date and writing it back in step 3 causes those modifications to be lost.</div><div></div><div></div><div>Unfortunately, I have not been able to reproduce this behavior in a smaller example application (nor have I spent much time attempting to do so). Regardless, I believe that the UART2CC26X2 driver should be updated to disable HWI within UART2CC26X2_readTimeout (and perhaps UART2CC26X2_writeTimeout), thereby protecting the contents of object->state.</div><div></div><div></div><div></div><div></div><div></div><div></div><div>In my own project, I solved the problem by passing timeout = 0 when calling UART2_readTimeout.</div><div></div><div>(Previously, I had been setting timeout = 1, which likely exacerbated the issue and was entirely unnecessary.)</div><div></div><div></div><div>There have been a couple of SDK releases since v4.40, and some work has been done to the UART2 driver, but I don't believe that this has been covered before. Having said this, do you have any tips on how I can reproduce what you are seeing in a simpler example application? This way I can pass the information to R&D and we can take care of it in a coming SDK release.</div><div></div><div></div><div>With these changes, I set a watchpoint to trigger when &((PowerCC26X2_module).constraintCounts)[2] was set to 0. </div><div></div><div>After sending a few characters via UART, the watchpoint was triggered within UART2CC26X2_hwiIntFxn. This indicates that the CC would be allowed to go into standby while UART RX is enabled, which should not happen.</div><div></div><div></div><div>Unfortunatly, quotes disapear in the output with this command.Earlier YQ version had a tostring built-in function, but not it is not working anymore apparently wit v4.I have tried style="double" without any success so far.</div><div></div><div></div><div>You seem to be confusing mikefarah/yq with kislyuk/yq. While the former (currently on version 4.40.5) is heavily inspired by jq but has its own DSL that never included tostring, the latter (currently on version 3.2.2) actually uses jq under the hood which of course did and still does have tostring.</div><div></div><div></div><div>And that proper encoding is the key to your solution. You could, for example, use the tojson or json encoders (supported by kislyuk/yq since the beginning (as its introduction into jq predates kislyuk/yq), and by mikefarah/yq since version 4.14.1 as tojson and since version 4.16.1 as json), which both provide you with double quotes on strings while leaving numbers as is.</div><div></div><div></div><div>Note, however, that it is not obvious from your sample how you want other (esp. edge-)cases to be handled, and whether all the aspects of this JSON-encoding (e.g. escaping double quotes in strings with backslash, removing insignificant whitespace from the formatting of arrays and objects, etc.) actually do fit your use-case. In fact, as you are writing the output into a file called .env, I'd guess that you want the output to be subsequently interpreted by a shell. For POSIX shells, you could, for example, use the sh encoder instead (supported by kislyuk/yq since the beginning (as its introduction into jq predates kislyuk/yq), and by mikefarah/yq since version 4.31.1). This way, you are guaranteed to get a valid encoding that can always be interpreted by the shell, but both implementations prefer using single quotes over double quotes for strings (making the encoding less noisy on special characters like $ as they don't require escaping).</div><div></div><div></div><div>The mikefarah/yq implementation even limits the quoting to where the shell requires their presence, which eventually might (and does indeed in this case) lead to the complete omission of quotes. Also, as the sh encoder of this implementation only processes strings, a conversion to !!str using tag or type becomes necessary.</div><div></div><div></div><div>But even with this shell-oriented encoding, you'd still need to determine whether it fits your use-case for data types other than those shown in your sample (e.g. kislyuk/yq would convert arrays into space-separated strings but refuse the conversion of objects altogether, while mikefarah/yq would simply produce the empty string when the iterable types !!seq and !!map are being converted into !!str).</div><div></div><div></div><div>If you have purchased a workstation compiler license, locate the activation key and have it ready for the install process. You may also wish to obtain a free C++ activation key if your purchased license includes only C/ASM language support. Visit for more information on free and paid compiler licenses for C and C++.</div><div></div><div></div><div>IMPORTANT: Upcoming change to -fno-common as the default -- A future MPLAB XC32 release will change the default for the C compiler from -fcommon to -fno-common. We recommend changing your projects to use -fno-common now to prepare for this upcoming change. The -fno-common option inhibits the merging of tentative definitions by the linker so you get a multiple-definition error if the same variable is accidentally defined in more than one compilation unit. In MPLAB X v6.10, you can find this option under [ Project Properties xc32-gcc Option categories: Optimization Use common tentative definitions: Disable ]. See the Migration Issue section for additional information.</div><div></div><div></div><div>NOTE: MPLAB X v6.15 Performance Improvement -- The MPLAB X v6.15 release introduced a significant improvement to the loading speed of MPLAB XC32 output ELF files with DWARF debugging information. Download the latest MPLAB X release here.</div><div></div><div></div><div>Use the lite variant for small embedded systems that need to save both heap memory and code space. The lite variant can cause heap fragmentation, which means the heap gets split into many small, disconnected free blocks. This can make it hard to find enough space for new allocations, which can eventually result in heap exhaustion. To avoid fragmentation, be careful with how you allocate and free dynamic memory of different sizes in your code.</div><div></div><div></div><div>Use the binning variant for general-purpose systems that care more about avoiding heap fragmentation. The binning variant puts memory blocks of similar sizes in groups, which helps keep the heap more organized, but this also adds more overhead for allocating and freeing memory. Note that while the binning variant reduces fragmentation, it cannot completely eliminate it.</div><div></div><div></div><div>Important: As part of this improvement to malloc() and related functions, the sbrk() function is now deprecated and will be removed in a future release of MPLAB XC32. When malloc() or a related function is used to allocate heap memory, the malloc() mechanism is assumed to have full control of the heap. Do not use sbrk() in combination with malloc() as this combination will cause runtime conflicts in heap management.</div><div></div><div></div><div>[Arm] Fast string.h functions -- When working with a bare-metal embedded system on a microcontroller with limited memory, you may want to optimize your code for either size or speed. The MPLAB XC32 toolchain lets you do that by offering different variants of many string.h library functions for various Arm architecture targets. Depending on your needs, you can select the variant that produces smaller code that uses less memory, or the version that runs faster and improves performance.</div><div></div><div> 795a8134c1</div>