Disable CAN interrupts to go to sleep mode

I am having trouble going into sleep mode on LPC1768 using mbed OS v5 as my CAN interrupts are always enabled. I am using the can.attach function using IRQtype as RxIrq to attach a function whenever a CAN frame received interrupt is generated(Documentation for CAN functions:
Mbed OS Reference | CAN Class Reference)
However this is preventing the controller from going into sleep mode. Is there any way to detach the CAN interrupt and go into sleep mode? Any help would be much appreciated.

Hello Vishal,

Attaching a 0 (or NULL), as explained in the func parameter description, should work as detach.

Best regards, Zoltan

Hello Jacky,

How your question about GSM modem is related to this topic about sleep mode and CAN interrupts?
Better is create new topic and provide more information about your project and problem.

  • Your board
  • Mbed version
  • Mbed tool - online, CLI, MbedStudio
  • Modem type
  • A code what you achieved and where you stuck

BR, Jan

Hey Zoltan,
I am still not able to enter sleep mode. Is running a ticker preventing the controller from entering sleep mode? If so how do i implement the Low power ticker? When i add the macro “MBED_TICKLESS” as well as add the “LPTICKER” tag to “device_has”, i get an error while compiling. Could you let me know how to enable low power ticker as well as let me know if anything else prevents LPC1768 from going to sleep mode on mbed os 5.


 "LPC1768": {
        "inherits": ["LPCTarget"],
        "core": "Cortex-M3",
        "extra_labels": ["NXP", "LPC176X", "MBED_LPC1768", "NXP_EMAC"],
        "supported_toolchains": ["ARM", "uARM", "GCC_ARM", "GCC_CR", "IAR"],
        "detect_code": ["1010"],
        "macros" : ["MBED_TICKLESS"],        
        "release_versions": ["2", "5"],
        "features": ["LWIP"],
        "device_name": "LPC1768",
        "bootloader_supported": true,
        "overrides": {
            "network-default-interface-type": "ETHERNET"

Linking error

 BUILD/LPC1768/GCC_ARM/mbed-os/hal/mbed_lp_ticker_api.o:(.rodata.lp_interface+0x0): undefined reference to `lp_ticker_init'