This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

external nRF5340 getting locked up

Hi,

I have developed a piece of software that only uses the GPIOs on the APP core to evaluate a sensor. The software worked on the development board processor so I made a custom board with the nRF5340. After I would load the same software that worked on the dev board onto the external board the debugging would start and immediately jump to the following code in fault_s.S

#if defined(CONFIG_ARMV6_M_ARMV8_M_BASELINE) || \
defined(CONFIG_ARMV7_M_ARMV8_M_MAINLINE)
mrs r0, MSP
mrs r1, PSP
mov r2, lr /* EXC_RETURN */

push {r0, lr}

it would run to push {r0,lr} after which I would loose connection to the board and every attempt to talk to the board after what would result in error message 

Firmware Version: J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
DLL Version: 6.60f
Hardware Version: V1.00
Target Voltage: 3.300
Device "NRF5340_XXAA_APP" selected.
ConfigTargetSettings() start
ConfigTargetSettings() end
ConfigTargetSettings() start
ConfigTargetSettings() end
connect failed
Failed to connect to target.
No idcode detected.
Please check connection and Target Interface Type

I have tried running the --eraseall and --recovery with nrfjprog but that failed as well. Here is the dump form the log

-------------------------------------------------------------------------------

nrfjprog -f UNKNOWN --recover --log
nrfjprog verion 9.7.1
--------------------------------------------------------------------------------
FUNCTION: open_dll.
FUNCTION: open_dll.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: enum_emu_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_with_snr.
FUNCTION: connect_to_emu_without_snr.
FUNCTION: enum_emu_snr.
Device "NRF52832_XXAA" selected.
FUNCTION: read_connected_emu_snr.
FUNCTION: read_connected_emu_snr.
FUNCTION: read_device_family.
FUNCTION: read_device_family.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -1.
JLinkARM.dll CORESIGHT_WriteAPDPReg returned error -102.
FUNCTION: close_dll.
FUNCTION: close_dll.

I have a 32k XTAL on the target board if that makes any difference in this situation

Any input would be appreciated

Dusan

  • Hi, 

    Did you power the external board directly? And is it running at the same voltage level as the nRF5340 PDK?

    Could you upload the schematic of the custom board? I made this case private. Your files are only shared with us (Nordic). 

    -Amanda H.

  • Hi,

    Thank you for your quick response.

    The board is supplied form a separate supply at 3.3V

    I am uploading the page of the schematic where the nRF is and you can also see which pins are used. I had to change the names but you can see the functionality.

    I find it very odd that it can be programmed only once, a new board is totally responsive over SWD. I can query it, read things out, erase it but as soon as I put the compiled software it stops responding and locks itself up. Is there a bare metal example without zephyr that I could try to test with? Are there special pins zephyr is expecting? Do I have to have the network core programmed as well?

  • Hi,

    Just one more observation. When I do an erase on the dev board and load the firmware the very first attempt to debug would result in the execution going to the fault_s.S followed by disconnection of the programmer. However the software starts running on the dev board, while it doesn't on the external board

    Dusan

  • Hi,  

    nrfjprog verion 9.7.1

    The nrfjprog supports nRF5340 from v10.4.  Could you use the latest version of nrfjprog (v10.8)?  and provide the log of the "nrfjprog -f UNKNOWN --recover --log" again.

    -Amanda H.

  • Hi,

    Is there a problem with software as I can flash it first time?

    Is zephyr expecting DCDC to run instead of LDO and then it would lock up the device as it would loose power as there is no DCDC implemented? Is there a bare metal software i can test with or configure zephyr? Is zephyr expecting a certain crystal?

    Attached is the log from the new nrfjprog

    2020-Apr-30 12:09:17 --------------------------------------------------------------------------------
    2020-Apr-30 12:09:17 nrfjprog -f UNKNOWN --recover --log
    2020-Apr-30 12:09:17 nrfjprog version 10.8.0
    2020-Apr-30 12:09:17 --------------------------------------------------------------------------------
    2020-Apr-30 12:09:17 nRF_logger_open
    2020-Apr-30 12:09:17 nRF_logger_open: nRFJProg logger opened to callback at address 0X4D0940
    2020-Apr-30 12:09:17 nRF_open_dll
    2020-Apr-30 12:09:17 nRF_open_dll: Load library at "C:\\Program Files (x86)\\Nordic Semiconductor\\nrf-command-line-tools\\bin\\JLINKARM_UNKNOWN_NRFJPROG.dll".

    2020-Apr-30 12:09:17 . nRFXX_logger_open
    2020-Apr-30 12:09:17 . nRFXX_logger_open: nRFJProg logger opened to callback at address 0X6E81B850
    2020-Apr-30 12:09:17 . . Segger_logger_open
    2020-Apr-30 12:09:17 . . Segger_logger_open: nRFJProg logger opened to callback at address 0X6E7DC8A0
    2020-Apr-30 12:09:17 . . Segger_open_dll
    2020-Apr-30 12:09:17 . . Segger_open_dll: Load library at "C:\\Program Files (x86)\\SEGGER\\JLink\\JLinkARM.dll".

    2020-Apr-30 12:09:17 . . . Segger_dll_version
    2020-Apr-30 12:09:17 . . Segger_set_core_data
    2020-Apr-30 12:09:17 nRF_enum_emu_snr
    2020-Apr-30 12:09:17 . nRFXX_enum_emu_snr
    2020-Apr-30 12:09:17 . . Segger_enum_emu_snr
    2020-Apr-30 12:09:17 . . . Segger_enum_emu_snr
    2020-Apr-30 12:09:17 . . . . Segger_get_num_emus
    2020-Apr-30 12:09:17 nRF_connect_to_emu_with_snr
    2020-Apr-30 12:09:17 . nRFXX_connect_to_emu_with_snr
    2020-Apr-30 12:09:17 . . Segger_connect_to_emu_with_snr
    2020-Apr-30 12:09:17 . . . Segger_is_connected_to_emu
    2020-Apr-30 12:09:17 . . . Segger_enum_emu_snr
    2020-Apr-30 12:09:17 . . . . Segger_get_num_emus
    2020-Apr-30 12:09:17 . . . Segger_connect_to_emu_with_snr
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: Segger logging enabled with callback at 0x1853738032.

    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:019.748
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO Firmware: J-Link OB-K22-NordicSemi compiled Jan 21 2020 17:33:01
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:021.366
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO Decompressing FW timestamp took 176 us
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:037.400
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO Hardware: V1.00
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:038.842
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO S/N: 960136811
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:039.972
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO OEM: SEGGER
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:041.033
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO Feature(s): RDI, FlashBP, FlashDL, JFlash, GDB
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:043.504
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO TELNET listener socket opened on port 19021
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:044.885
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO WEBSRV Starting webserver
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:046.060
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO WEBSRV Webserver running on local port 19080
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:047.138
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 31.450ms returns O.K.
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:048.205
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_GetHWStatus(...)
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:049.488
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 1.832ms returns 0x00
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:050.569
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("SetRestartOnClose = 0", ...).
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:051.795
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 0.625ms returns 0x01
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:053.018
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("DisableFlashDL", ...).
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:054.220
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 0.597ms returns 0x00
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:055.393
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_ExecCommand("ExcludeFlashCacheRange 0x0-0xFFFFFFFF", ...).
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:056.584
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 0.600ms returns 0x00
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:057.813
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_SetHookUnsecureDialog(...)
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:059.033
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 1.816ms returns 0
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:060.249
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_TIF_Select(JLINKARM_TIF_SWD)
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:062.174
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 2.550ms returns 0x00
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:063.371
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO JLINK_SetSpeed(2000)
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO T30B8 000:064.553
    2020-Apr-30 12:09:17 . . . . Segger_connect_to_emu_without_snr: JLink INFO - 1.771ms
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:066.269
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO JLINK_ExecCommand("CORESIGHT_SetIndexAHBAPToUse = 0", ...).
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:067.388
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO - 0.627ms returns 0x00
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:068.713
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO JLINK_ExecCommand("device = Cortex-M4", ...).
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:077.455
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO XML file found at: C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:079.832
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO C:\Program Files (x86)\SEGGER\JLink\JLinkDevices.xml evaluated successfully.
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:151.322
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO Device "CORTEX-M4" selected.
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO T30B8 000:155.296
    2020-Apr-30 12:09:17 . . . . . Segger_load_core_data: JLink INFO - 86.052ms returns 0x00
    2020-Apr-30 12:09:17 nRF_read_connected_emu_snr
    2020-Apr-30 12:09:17 . nRFXX_read_connected_emu_snr
    2020-Apr-30 12:09:17 . . Segger_read_connected_emu_snr
    2020-Apr-30 12:09:17 . . . Segger_is_connected_to_emu
    2020-Apr-30 12:09:17 . . . Segger_is_connected_to_emu: JLink INFO T30B8 000:159.100
    2020-Apr-30 12:09:17 . . . Segger_is_connected_to_emu: JLink INFO JLINK_IsOpen()
    2020-Apr-30 12:09:17 . . . Segger_is_connected_to_emu: JLink INFO T30B8 000:160.493
    2020-Apr-30 12:09:17 . . . Segger_is_connected_to_emu: JLink INFO - 1.973ms returns 0x01
    2020-Apr-30 12:09:17 nRF_read_device_family
    2020-Apr-30 12:09:17 . nRFXX_read_device_family
    2020-Apr-30 12:09:17 . . Segger_is_connected_to_emu
    2020-Apr-30 12:09:17 . . Segger_is_connected_to_emu: JLink INFO T30B8 000:163.364
    2020-Apr-30 12:09:17 . . Segger_is_connected_to_emu: JLink INFO JLINK_IsOpen()
    2020-Apr-30 12:09:17 . . Segger_is_connected_to_emu: JLink INFO T30B8 000:164.537
    2020-Apr-30 12:09:17 . . Segger_is_connected_to_emu: JLink INFO - 1.738ms returns 0x01
    2020-Apr-30 12:09:17 . . : JLink INFO T30B8 000:165.666
    2020-Apr-30 12:09:17 . . : JLink INFO JLINK_Lock()
    2020-Apr-30 12:09:17 . . Segger_read_debug_port_idr
    2020-Apr-30 12:09:17 . . . Segger_read_debug_port_register
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register
    2020-Apr-30 12:09:17 . . . . . Segger_coresight_configure
    2020-Apr-30 12:09:17 . . . . . Segger_coresight_configure: JLink INFO T30B8 000:168.992
    2020-Apr-30 12:09:17 . . . . . Segger_coresight_configure: JLink INFO JLINK_CORESIGHT_Configure()
    2020-Apr-30 12:09:17 . . . . . Segger_coresight_configure: JLink INFO T30B8 000:271.141
    2020-Apr-30 12:09:17 . . . . . Segger_coresight_configure: JLink INFO - 103.091ms returns 0
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLink INFO T30B8 000:272.793
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLink INFO JLINK_CORESIGHT_ReadAPDPReg(DP reg 0x00)
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLink INFO T30B8 000:274.763
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLink INFO failed
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLink INFO T30B8 000:276.058
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLink INFO - 3.926ms returns -1
    2020-Apr-30 12:09:17 . . . . Segger_read_debug_port_register: JLinkARM.dll reported "-1", an unknown error.

    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action
    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action: Attempting to clear any configuration errors in debug port before closing connection.

    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action: JLink INFO T30B8 000:279.244
    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action: JLink INFO T30B8 000:281.090
    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action: JLink INFO - 2.465ms returns -1
    2020-Apr-30 12:09:17 . . . . . Segger_abort_debug_action: JLinkARM.dll reported "-1", an unknown error.

    2020-Apr-30 12:09:17 . . : JLink INFO T30B8 000:282.861
    2020-Apr-30 12:09:17 . . : JLink INFO JLINK_Unlock()
    2020-Apr-30 12:09:17 nRF_close_dll
    2020-Apr-30 12:09:17 . nRFXX_close_dll
    2020-Apr-30 12:09:17 . . Segger_close
    2020-Apr-30 12:09:17 . . . Segger_disconnect_from_emu
    2020-Apr-30 12:09:17 . . . . Segger_is_connected_to_emu
    2020-Apr-30 12:09:18 . . . . Segger_is_connected_to_emu: JLink INFO T30B8 000:286.764
    2020-Apr-30 12:09:18 . . . . Segger_is_connected_to_emu: JLink INFO JLINK_IsOpen()
    2020-Apr-30 12:09:18 . . . . Segger_is_connected_to_emu: JLink INFO T30B8 000:287.894
    2020-Apr-30 12:09:18 . . . . Segger_is_connected_to_emu: JLink INFO - 1.713ms returns 0x01
    2020-Apr-30 12:09:18 . . . . Segger_disconnect_from_emu
    2020-Apr-30 12:09:18 . . . . . Segger_is_connected_to_device
    2020-Apr-30 12:09:18 . . . . . Segger_is_connected_to_device: JLink INFO T30B8 000:290.225
    2020-Apr-30 12:09:18 . . . . . Segger_is_connected_to_device: JLink INFO JLINK_IsConnected()
    2020-Apr-30 12:09:18 . . . . . Segger_is_connected_to_device: JLink INFO T30B8 000:291.337
    2020-Apr-30 12:09:18 . . . . . Segger_is_connected_to_device: JLink INFO - 1.667ms returns FALSE
    2020-Apr-30 12:09:18 . . . . . Segger_is_debug_region_powered
    2020-Apr-30 12:09:18 . . . . . . Segger_read_debug_port_register
    2020-Apr-30 12:09:18 . . . . . . . Segger_is_connected_to_emu
    2020-Apr-30 12:09:18 . . . . . . . Segger_is_connected_to_emu: JLink INFO T30B8 000:294.119
    2020-Apr-30 12:09:18 . . . . . . . Segger_is_connected_to_emu: JLink INFO JLINK_IsOpen()
    2020-Apr-30 12:09:18 . . . . . . . Segger_is_connected_to_emu: JLink INFO T30B8 000:295.428
    2020-Apr-30 12:09:18 . . . . . . . Segger_is_connected_to_emu: JLink INFO - 1.877ms returns 0x01
    2020-Apr-30 12:09:18 . . . . . . Segger_read_debug_port_register: JLink INFO T30B8 000:296.567
    2020-Apr-30 12:09:18 . . . . . . Segger_read_debug_port_register: JLink INFO JLINK_Lock()
    2020-Apr-30 12:09:18 . . . . . . . Segger_write_debug_port_register
    2020-Apr-30 12:09:18 . . . . . . . Segger_write_debug_port_register: JLink INFO T30B8 000:298.264
    2020-Apr-30 12:09:18 . . . . . . . Segger_write_debug_port_register: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x02, 0x00000000)
    2020-Apr-30 12:09:18 . . . . . . . Segger_write_debug_port_register: JLink INFO T30B8 000:299.992
    2020-Apr-30 12:09:18 . . . . . . . Segger_write_debug_port_register: JLink INFO - 2.303ms returns -1
    2020-Apr-30 12:09:18 . . . . . . . Segger_write_debug_port_register: JLinkARM.dll reported "-1", an unknown error.

    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action
    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action: Attempting to clear any configuration errors in debug port before closing connection.

    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action: JLink INFO T30B8 000:302.919
    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action: JLink INFO JLINK_CORESIGHT_WriteAPDPReg(DP reg 0x00, 0x0000001F)
    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action: JLink INFO T30B8 000:304.733
    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action: JLink INFO - 2.411ms returns -1
    2020-Apr-30 12:09:18 . . . . . . . . Segger_abort_debug_action: JLinkARM.dll reported "-1", an unknown error.

    2020-Apr-30 12:09:18 . . . . . . Segger_read_debug_port_register: JLink INFO T30B8 000:306.510
    2020-Apr-30 12:09:18 . . . . . . Segger_read_debug_port_register: JLink INFO JLINK_Unlock()
    2020-Apr-30 12:09:18 . . . . Segger_disconnect_from_emu: JLink INFO T30B8 000:321.354
    2020-Apr-30 12:09:18 . . . . Segger_disconnect_from_emu: JLink INFO JLINK_Close()
    2020-Apr-30 12:09:18 . . Segger_close: Freeing Library.

    2020-Apr-30 12:09:18 nRF_close_dll: Freeing Library.

Related