Skip to content

Commit

Permalink
nrfx 1.8.5 release
Browse files Browse the repository at this point in the history
  • Loading branch information
nika-nordic committed Dec 9, 2020
1 parent 233d3af commit bc1fb91
Show file tree
Hide file tree
Showing 16 changed files with 186 additions and 34 deletions.
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# Changelog
All notable changes to this project are documented in this file.

## [1.8.5] - 2020-07-09
### Added
- Implemented workaround for anomaly 211 in the USBD driver.

### Changed
- Updated MDK to version 8.32.3.

## [1.8.4] - 2020-04-27
- Fixed an issue in the NFCT driver where the FIELDDETECTED event would be ignored and the FIELDLOST event would be processed twice. The driver now properly handles FIELDDETECTED and FIELDLOST events.

Expand Down
31 changes: 31 additions & 0 deletions drivers/src/nrfx_usbd.c
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,11 @@
#define NRFX_USBD_DMAREQ_PROCESS_DEBUG 1
#endif

#ifndef NRFX_USBD_USE_WORKAROUND_FOR_ANOMALY_211
/* Anomaly 211 - Device remains in SUSPEND too long when host resumes
bus activity (sending SOF packets) without a RESUME condition. */
#define NRFX_USBD_USE_WORKAROUND_FOR_ANOMALY_211 0
#endif

/**
* @defgroup nrfx_usbd_int USB Device driver internal part
Expand Down Expand Up @@ -1578,7 +1583,11 @@ void nrfx_usbd_enable(void)
/* Prepare for READY event receiving */
nrf_usbd_eventcause_clear(NRF_USBD_EVENTCAUSE_READY_MASK);

#if NRFX_USBD_USE_WORKAROUND_FOR_ANOMALY_211
if (nrfx_usbd_errata_187() || nrfx_usbd_errata_211())
#else
if (nrfx_usbd_errata_187())
#endif
{
NRFX_CRITICAL_SECTION_ENTER();
if (*((volatile uint32_t *)(0x4006EC00)) == 0x00000000)
Expand Down Expand Up @@ -1662,7 +1671,11 @@ void nrfx_usbd_enable(void)

m_drv_state = NRFX_DRV_STATE_POWERED_ON;

#if NRFX_USBD_USE_WORKAROUND_FOR_ANOMALY_211
if (nrfx_usbd_errata_187() && !nrfx_usbd_errata_211())
#else
if (nrfx_usbd_errata_187())
#endif
{
NRFX_CRITICAL_SECTION_ENTER();
if (*((volatile uint32_t *)(0x4006EC00)) == 0x00000000)
Expand Down Expand Up @@ -1691,6 +1704,24 @@ void nrfx_usbd_disable(void)
nrf_usbd_disable();
usbd_dma_pending_clear();
m_drv_state = NRFX_DRV_STATE_INITIALIZED;

#if NRFX_USBD_USE_WORKAROUND_FOR_ANOMALY_211
if (nrfx_usbd_errata_211())
{
NRFX_CRITICAL_SECTION_ENTER();
if (*((volatile uint32_t *)(0x4006EC00)) == 0x00000000)
{
*((volatile uint32_t *)(0x4006EC00)) = 0x00009375;
*((volatile uint32_t *)(0x4006ED14)) = 0x00000000;
*((volatile uint32_t *)(0x4006EC00)) = 0x00009375;
}
else
{
*((volatile uint32_t *)(0x4006ED14)) = 0x00000000;
}
NRFX_CRITICAL_SECTION_EXIT();
}
#endif
}

void nrfx_usbd_start(bool enable_sof)
Expand Down
6 changes: 6 additions & 0 deletions drivers/src/nrfx_usbd_errata.h
Original file line number Diff line number Diff line change
Expand Up @@ -69,4 +69,10 @@ static inline bool nrfx_usbd_errata_199(void)
return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_199();
}

/* Errata: Device remains in SUSPEND too long. */
static inline bool nrfx_usbd_errata_211(void)
{
return NRFX_USBD_ERRATA_ENABLE && nrf52_errata_211();
}

#endif // NRFX_USBD_ERRATA_H__
2 changes: 1 addition & 1 deletion mdk/nrf.h
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ POSSIBILITY OF SUCH DAMAGE.
/* MDK version */
#define MDK_MAJOR_VERSION 8
#define MDK_MINOR_VERSION 32
#define MDK_MICRO_VERSION 1
#define MDK_MICRO_VERSION 3

/* Define NRF51_SERIES for common use in nRF51 series devices. Only if not previously defined. */
#if defined (NRF51) ||\
Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf51.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf51.h
* @brief CMSIS HeaderFile
* @version 522
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:51
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:28
* from File 'nrf51.svd',
* last modified on Wednesday, 04.03.2020 13:56:43
* last modified on Thursday, 09.07.2020 11:19:20
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:52
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:29
* from File 'nrf52.svd',
* last modified on Wednesday, 04.03.2020 13:56:43
* last modified on Thursday, 09.07.2020 11:19:20
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52805.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52805.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:51
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:28
* from File 'nrf52805.svd',
* last modified on Wednesday, 04.03.2020 13:56:43
* last modified on Thursday, 09.07.2020 11:19:20
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52810.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52810.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:51
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:28
* from File 'nrf52810.svd',
* last modified on Wednesday, 04.03.2020 13:56:43
* last modified on Thursday, 09.07.2020 11:19:20
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52811.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52811.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:51
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:29
* from File 'nrf52811.svd',
* last modified on Wednesday, 04.03.2020 13:56:44
* last modified on Thursday, 09.07.2020 11:19:21
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52820.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52820.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:51
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:29
* from File 'nrf52820.svd',
* last modified on Wednesday, 04.03.2020 13:56:44
* last modified on Thursday, 09.07.2020 11:19:21
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52833.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52833.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:52
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:29
* from File 'nrf52833.svd',
* last modified on Wednesday, 04.03.2020 13:56:44
* last modified on Thursday, 09.07.2020 11:19:21
*/


Expand Down
6 changes: 3 additions & 3 deletions mdk/nrf52840.h
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@
* @file nrf52840.h
* @brief CMSIS HeaderFile
* @version 1
* @date 04. March 2020
* @note Generated by SVDConv V3.3.25 on Wednesday, 04.03.2020 14:56:52
* @date 09. July 2020
* @note Generated by SVDConv V3.3.25 on Thursday, 09.07.2020 13:19:30
* from File 'nrf52840.svd',
* last modified on Wednesday, 04.03.2020 13:56:44
* last modified on Thursday, 09.07.2020 11:19:21
*/


Expand Down
Loading

0 comments on commit bc1fb91

Please sign in to comment.