'work_queue' dont works with custom named module

Hello, I try to start ‘work_queue’ process in my custom module.
I add it with CMakeLists.txt as:
px4_add_module(
MODULE drivers__pwm-uvr
MAIN pwm_uvr
STACK_MAIN 1024
COMPILE_FLAGS
-Wno-pmf-conversions
SRCS
pwm_uvr.cpp
DEPENDS
)

I add module, this module appears in builtin lists, but… I added simple app with uorb publishing, and I cannot launch queue process inside it.
Actually work_queue dont works (uorb top command dont shows uorb process or any debug info). But if I change MAIN pwm_uvr and all related functions to adc (for example)
(MAIN adc I mean), work queue starts works fine (uorb top shows me that I want). But I cannot launch it with any custom name of module.


using namespace time_literals;
class PWM : public cdev::CDev
{
public:
PWM();
~PWM();
virtual int init();
void _tick();
static void _tick_trampoline(int argc, char argv);
protected:
private:
static const hrt_abstime _tickrate = 10000; /
< 100Hz base rate */
orb_advert_t _to_pwm_input;
};

static PWM *g_pwm;

struct work_s workerPWM;
uint32_t workPWMPeriod = 50000; //microseconds
bool workerPWMEnabled = false;
int cc=0;
//-----------------------------------------------------------------------------------------
PWM::PWM() :
CDev(PWMIN0_DEVICE_PATH),
_to_pwm_input(nullptr)
{
}

PWM::~PWM()
{
}
//-----------------------------------------------------------------------------------------
int PWM::init()
{
CDev::init();
printf(“PWM init\n”);
work_queue(HPWORK, &workerPWM, (worker_t)&PWM::_tick_trampoline,NULL,0);
workerPWMEnabled = true;
return 0;
}
//-----------------------------------------------------------------------------------------
void PWM::_tick_trampoline(int argc, char **argv)
{
g_pwm->_tick();
}
//-----------------------------------------------------------------------------------------
void PWM::_tick()
{
if (!workerPWMEnabled) return;
pwm_input_s pwm;
int instance1;
orb_publish_auto(ORB_ID(pwm_input),&_to_pwm_input,&pwm,&instance1,ORB_PRIO_HIGH);
work_queue(HPWORK,&workerPWM,(worker_t)&PWM::_tick_trampoline,NULL,USEC2TICK(workPWMPeriod));
workerPWMEnabled = true;
}

//-----------------------------------------------------------------------------------------
extern “C” __EXPORT int pwm_uvr_main(int argc, char *argv[]);
//-----------------------------------------------------------------------------------------

int pwm_uvr_main(int argc, char *argv[])
{
if (g_pwm == nullptr)
{
g_pwm = new PWM();
if (g_pwm == nullptr)
{
errx(1, “couldn’t allocate the PWM driver”);
}
}

if (argc > 1)
{
if (!strcmp(argv[1], “start”))
{
g_pwm->init();
}
}
exit(0);
}

What a problem can I have?

You’ll only see tasks in top. When running out of the work queue your module is within the existing hpwork or lpwork tasks.