Renesas USB Device
USB Host Mass Storage Class Driver(HMSC)
R01AN0513EJ0110 Rev.1.10
Page 52 of 55
Aug 10, 2011
9.2
Including Resources in Non-OS Scheduler
In the sample program, it is composed of HCD, MGR, HUB, HMSCD, HMSDD, APL, and the scheduler.
FAT file system library (TFAT) uses Renesas M3S-TFAT-Tiny-RX
Table 9.1 Taks Lists
Task
Task function name
Task ID
Priority
HCD usb_hstd_HcdTask
USB_HCD_TSK
USB_HCD_PRI
MGR usb_hstd_MgrTask
USB_MGR_TSK
USB_MGR_PRI
HUB usb_hhub_Task
USB_HUB_TSK
USB_HUB_PRI
HMSCD usb_hmsc_Task USB_HMSC_TSK USB_HMSC_PRI
HMSDD usb_hmsc_StrgDriveTask
USB_HSTRG_TSK
USB_HSTRG_PRI
APL usb_hmsc_SampleAplTask
USB_HMSCSMP_TSK
USB_HMSCSMP_PRI
Scheduler R_usbc_cstd_Scheduler()
-
-
9.2.1
Scheduler Setting
When the non OS scheduler is used, the resource registration such as task ID, mailbox ID, and memory pool ID sets the
scheduler macro definition with r_usbc_cKernelId.h as follows.
/* Host Sample Task */
#define USB_HMSC_TSK
USBC_TID_4
/* Task ID */
#define USB_HMSC_PRI
USBC_PRI_3
/*
Priority
*/
#define USB_HMSC_MBX
USB2_HMSC_TSK
/* Mailbox ID */
#define USB_HMSC_MPL
USB2_HMSC_TSK
/* Memorypool ID */
/* Host Sample Task */
#define USB_HSTRG_TSK
USBC_TID_5
/* Task ID */
#define USB_HSTRG_PRI
USBC_PRI_3
/* Priority */
#define USB_HSTRG_MBX
USB2_HSTRG_TSK /* Mailbox ID */
#define USB_HSTRG_MPL
USB2_HSTRG_TSK /* Memorypool ID */
/* Host Sample Task */
#define USB_HMSCSMP_TSK
USBC_TID_6
/* Task ID */
#define USB_HMSCSMP_PRI
USBC_PRI_4
/* Priority */
#define USB_HMSCSMP_MBX
USB_HMSCSMP_TSK
/* Mailbox ID */
#define USB_HMSCSMP_MPL
USB_HMSCSMP_TSK
/* Memorypool ID */
9.2.2
Task Priority setting
The task priority level is set by the R_usbc_cstd_SetTaskPri() function.
In the usb_hmsc_SetTaskPri () function of r_usb_HMSC_apl.c, the task priority level is set as follows.
void usb_hmsc_SetTaskPri
(void)
{
R_usbc_cstd_SetTaskPri(USB_HCD_TSK, USB_HCD_PRI);
R_usbc_cstd_SetTaskPri(USB_MGR_TSK, USB_MGR_PRI);
R_usbc_cstd_SetTaskPri(USB_HUB_TSK, USB_HUB_PRI);
R_usbc_cstd_SetTaskPri(USB_HMSC_TSK,
USB_HMSC_PRI);
R_usbc_cstd_SetTaskPri(USB_HSTRG_TSK, USB_HSTRG_PRI);
R_usbc_cstd_SetTaskPri(USB_HMSCSMP_TSK, USB_HMSCSMP_PRI);
}
These resources are defined in the file
r_usbc_cKernelId.h
.
Содержание R8A66597
Страница 56: ......