Azure RTOS ThreadX NetXDuo Cache
Hello together,
I have a question regarding caching on AzureRTOS ThreadX/NetXDuo. At the moment I am switching from freeRTOS + lwIP to AzureRTOS ThreadX + NetXDuo. So far everything works but I have some questions regarding caching.
I know that the ethernet 2 descriptiors DMARxDscrTab + DMATxDescrTab
ETH_DMADescTypeDef DMARxDscrTab[ETH_RX_DESC_CNT] __attribute__((section(".RxDecripSection"))); /* Ethernet Rx DMA Descriptors */
ETH_DMADescTypeDef DMATxDscrTab[ETH_TX_DESC_CNT] __attribute__((section(".TxDecripSection"))); /* Ethernet Tx DMA Descriptors */
uint8_t Rx_Buff[ETH_RX_DESC_CNT][ETH_MAX_PACKET_SIZE] __attribute__((section(".RxArraySection"))); /* Ethernet Receive Buffers */must be protected by the MPU to avoid caching due to DMA access. So far no problem, I have set the regon to "Device" so that they can't be cached. Now on AzureRTOS NetXDuo it seem that Rx_Buff is not needed as this is allocated by the general byte-pool of AzureRTOS.
- a. Is this assuption correct?
In my case the buffer is called nx_byte_pool_buffer.
#if defined ( __ICCARM__ ) /* IAR Compiler */
#pragma location = ".NetXPoolSection"
#elif defined ( __CC_ARM ) /* MDK ARM Compiler */
__attribute__((section(".NetXPoolSection")))
#elif defined ( __GNUC__ ) /* GNU Compiler */
__attribute__((section(".NetXPoolSection")))
#endif
/* USER CODE END NX_Pool_Buffer */
static UCHAR nx_byte_pool_buffer[NX_APP_MEM_POOL_SIZE];
static TX_BYTE_POOL nx_app_byte_pool;So what about caching on this general byte pool as all threads and byte storages are allocated from it.
- b. Can I enable caching here or should I protect it from caching as well by MPU settings?
Many thanks in advance.
