+#ifdef TARGET_TMS570_RPP
+int cmd_do_sleep(cmd_io_t *cmd_io, const struct cmd_des *des, char *param[])
+{
+ hal_gpio_pin_set_value(PIN_DSC_CANNSTB, 1);
+ hal_gpio_pin_set_value(PIN_DSC_CANEN, 1);
+ hal_gpio_pin_set_value(PIN_DSC_LIN2NSLP, 1);
+ hal_gpio_pin_set_value(PIN_DSC_LIN1NSLP, 1);
+ vTaskDelay(10/portTICK_RATE_MS);
+ hal_gpio_pin_set_value(PIN_DSC_LIN2NSLP, 0);
+ hal_gpio_pin_set_value(PIN_DSC_LIN1NSLP, 0);
+ hal_gpio_pin_set_value(PIN_DSC_CANNSTB, 0);
+ return 0;
+}
+
+/** Command descriptor for sleep command */
+cmd_des_t const cmd_des_sleep = {
+ 0, 0,
+ "sleep","Sleep the board",
+ "### Syntax ###\n"
+ "\n"
+ " sleep\n"
+ "\n"
+ "### Description ###\n"
+ "\n"
+ "This command configures the LIN and CAN peripherals to enter sleep mode\n"
+ "and turn the whole device into sleep mode. External signal on CAN or\n"
+ "LIN will wake the device up.\n",
+ CMD_HANDLER(cmd_do_sleep), (void *)&cmd_list
+};
+#endif
+