CART
  • Cart is empty.

    ItemQuantityPrice

    Total: $0

SVC test


SVC test.

Toolkit:STM Development System

Location:/bipom/devtools/STM32/examples/svc

Code Example


#define SVC5()				__asm volatile ( "	SVC	%0	\n" :: "i" (5) )
#define SVC6()				__asm volatile ( "	SVC	%0	\n" :: "i" (6) )
#define SVC_DELAY			1000

//********************************************************************************

void SVCHandler(unsigned char svcNumber)
{
	tprintf("\n\rSVC#%d",svcNumber);
}

//********************************************************************************

static void vSVCTEST( void *pvParameters )
{
	(void) pvParameters;
	while(1) 
	{
		vTaskDelay(SVC_DELAY);
		SVC5();
		vTaskDelay(SVC_DELAY);
		SVC6();
  	}
}

//********************************************************************************

int main(void) 
{
	delayMs(250);
	
	tprintf("\n\rMini-Max/STM32F1");
	tprintf("\n\rSVC TEST REV 1.01");
	//

	if(pdPASS != 
		xTaskCreate (vSVCTEST, ( const signed portCHAR * const )"SVCTEST", 
			configMINIMAL_STACK_SIZE<<4, NULL, tskIDLE_PRIORITY, NULL ))
	{
		tprintf("\n\rERROR: can't create SVCTEST task");
	}
	/* Now all the tasks have been started - start the scheduler. */
	vTaskStartScheduler();
	for(;;);
	return 0;
}